From 409f8210035673e61ee1fa260d4eb6558657452a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 22 Apr 2026 09:16:30 +0000 Subject: [PATCH 1/2] docs: Updated docs for the APIs feat: Adding client libraries for Deployment API Compliance Manager Service PiperOrigin-RevId: 903655636 Source-Link: https://github.com/googleapis/googleapis/commit/e9975a386360bc96d03ef289c7fc2cc20b7b5f8b Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a09aece0a3cd48ce8db0159887fe00b2f9583ac Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNsb3Vkc2VjdXJpdHljb21wbGlhbmNlLy5Pd2xCb3QueWFtbCIsImgiOiI4YTA5YWVjZTBhM2NkNDhjZThkYjAxNTk4ODdmZTAwYjJmOTU4M2FjIn0= --- .../.eslintignore | 7 + .../.eslintrc.json | 4 + .../.gitattributes | 4 + .../.gitignore | 14 + .../.jsdoc.js | 55 + .../.mocharc.js | 33 + .../.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 22 + .../CODE_OF_CONDUCT.md | 94 + .../CONTRIBUTING.md | 76 + .../LICENSE | 202 + .../README.md | 140 + .../cloudsecuritycompliance/v1/audit.proto | 512 + .../v1/cm_enrollment_service.proto | 159 + .../cloudsecuritycompliance/v1/common.proto | 810 + .../cloudsecuritycompliance/v1/config.proto | 456 + .../v1/deployment.proto | 620 + .../v1/monitoring.proto | 670 + .../protos/protos.d.ts | 19302 ++++++ .../protos/protos.js | 51390 ++++++++++++++++ .../protos/protos.json | 5937 ++ .../v1/audit.create_framework_audit.js | 78 + ...t.generate_framework_audit_scope_report.js | 75 + .../generated/v1/audit.get_framework_audit.js | 65 + .../v1/audit.list_framework_audits.js | 87 + ...rvice.calculate_effective_cm_enrollment.js | 65 + ...enrollment_service.update_cm_enrollment.js | 66 + .../v1/config.create_cloud_control.js | 76 + .../generated/v1/config.create_framework.js | 75 + .../v1/config.delete_cloud_control.js | 66 + .../generated/v1/config.delete_framework.js | 65 + .../generated/v1/config.get_cloud_control.js | 71 + .../generated/v1/config.get_framework.js | 71 + .../v1/config.list_cloud_controls.js | 82 + .../generated/v1/config.list_frameworks.js | 78 + .../v1/config.update_cloud_control.js | 76 + .../generated/v1/config.update_framework.js | 73 + .../deployment.create_framework_deployment.js | 77 + .../deployment.delete_framework_deployment.js | 76 + ...deployment.get_cloud_control_deployment.js | 65 + .../v1/deployment.get_framework_deployment.js | 65 + ...ployment.list_cloud_control_deployments.js | 90 + .../deployment.list_framework_deployments.js | 91 + ...g.aggregate_framework_compliance_report.js | 73 + ...oring.fetch_framework_compliance_report.js | 69 + ...oring.list_control_compliance_summaries.js | 81 + .../v1/monitoring.list_finding_summaries.js | 81 + ...ing.list_framework_compliance_summaries.js | 81 + ...ogle.cloud.cloudsecuritycompliance.v1.json | 1287 + .../src/index.ts | 35 + .../src/v1/audit_client.ts | 2798 + .../src/v1/audit_client_config.json | 58 + .../src/v1/audit_proto_list.json | 8 + .../src/v1/cm_enrollment_service_client.ts | 2106 + .../cm_enrollment_service_client_config.json | 48 + .../v1/cm_enrollment_service_proto_list.json | 8 + .../src/v1/config_client.ts | 3309 + .../src/v1/config_client_config.json | 88 + .../src/v1/config_proto_list.json | 8 + .../src/v1/deployment_client.ts | 3169 + .../src/v1/deployment_client_config.json | 68 + .../src/v1/deployment_proto_list.json | 8 + .../src/v1/gapic_metadata.json | 381 + .../src/v1/index.ts | 23 + .../src/v1/monitoring_client.ts | 2808 + .../src/v1/monitoring_client_config.json | 63 + .../src/v1/monitoring_proto_list.json | 8 + .../system-test/fixtures/sample/src/index.js | 31 + .../system-test/fixtures/sample/src/index.ts | 56 + .../system-test/install.ts | 49 + .../test/gapic_audit_v1.ts | 2680 + .../test/gapic_cm_enrollment_service_v1.ts | 1919 + .../test/gapic_config_v1.ts | 3156 + .../test/gapic_deployment_v1.ts | 3079 + .../test/gapic_monitoring_v1.ts | 2745 + .../tsconfig.json | 22 + .../webpack.config.js | 64 + 78 files changed, 112637 insertions(+) create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitattributes create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitignore create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.nycrc create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/LICENSE create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json new file mode 100644 index 00000000000..3e8d97ccb39 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "./node_modules/gts", + "root": true +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitattributes b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.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/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitignore b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.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/owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js new file mode 100644 index 00000000000..a760884c194 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2026 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 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/cloudsecuritycompliance', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js new file mode 100644 index 00000000000..5eb34e86c87 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2026 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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +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/owl-bot-staging/google-cloud-cloudsecuritycompliance/.nycrc b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.nycrc new file mode 100644 index 00000000000..81a95fc94b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.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 +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js new file mode 100644 index 00000000000..7649ee3c254 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2026 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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md b/owl-bot-staging/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md b/owl-bot-staging/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md new file mode 100644 index 00000000000..1cc1cbcd1e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloudsecuritycompliance API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudsecuritycompliance.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/LICENSE b/owl-bot-staging/google-cloud-cloudsecuritycompliance/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/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/owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md b/owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md new file mode 100644 index 00000000000..3270631ef7d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md @@ -0,0 +1,140 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Cloud Security Compliance API: Nodejs Client][homepage] + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + +[![npm version](https://img.shields.io/npm/v/@google-cloud/cloudsecuritycompliance.svg)](https://www.npmjs.org/package/@google-cloud/cloudsecuritycompliance) + +Cloud Security Compliance API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Cloud Security Compliance API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/cloudsecuritycompliance/latest) +* [Cloud Security Compliance API Documentation](https://cloud.google.com/security-command-center/docs/compliance-manager-overview) + +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 Cloud Security Compliance API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/cloudsecuritycompliance +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| create framework audit | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js) | +| generate framework audit scope report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js) | +| get framework audit | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js) | +| list framework audits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js) | +| calculate effective cm enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js) | +| update cm enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js) | +| create cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js) | +| create framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js) | +| delete cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js) | +| delete framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js) | +| get cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js) | +| get framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js) | +| list cloud controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js) | +| list frameworks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js) | +| update cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js) | +| update framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js) | +| create framework deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js) | +| delete framework deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js) | +| get cloud control deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js) | +| get framework deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js) | +| list cloud control deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js) | +| list framework deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js) | +| aggregate framework compliance report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js) | +| fetch framework compliance report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js) | +| list control compliance summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js) | +| list finding summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js) | +| list framework compliance summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js) | +| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/cloudsecuritycompliance@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/LICENSE) + +[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=cloudsecuritycompliance.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto new file mode 100644 index 00000000000..b5877f19917 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto @@ -0,0 +1,512 @@ +// Copyright 2025 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "AuditProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; + +// Service describing handlers for resources +service Audit { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Generates an audit scope report for a framework. + rpc GenerateFrameworkAuditScopeReport( + GenerateFrameworkAuditScopeReportRequest) + returns (GenerateFrameworkAuditScopeReportResponse) { + option (google.api.http) = { + post: "/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" + body: "*" + additional_bindings { + post: "/v1/{scope=projects/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" + body: "*" + } + additional_bindings { + post: "/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" + body: "*" + } + }; + option (google.api.method_signature) = + "scope,report_format,compliance_framework"; + } + + // Creates an audit scope report for a framework. + rpc CreateFrameworkAudit(CreateFrameworkAuditRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/locations/*}/frameworkAudits" + body: "framework_audit" + additional_bindings { + post: "/v1/{parent=folders/*/locations/*}/frameworkAudits" + body: "framework_audit" + } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/frameworkAudits" + body: "framework_audit" + } + }; + option (google.api.method_signature) = + "parent,framework_audit,framework_audit_id"; + option (google.longrunning.operation_info) = { + response_type: "FrameworkAudit" + metadata_type: "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + }; + } + + // Lists the framework audits for a given organization, folder, or project. + rpc ListFrameworkAudits(ListFrameworkAuditsRequest) + returns (ListFrameworkAuditsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/frameworkAudits" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/frameworkAudits" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworkAudits" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details for a framework audit. + rpc GetFrameworkAudit(GetFrameworkAuditRequest) returns (FrameworkAudit) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworkAudits/*}" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/frameworkAudits/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkAudits/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// The state of compliance after evaluation is complete. +enum ComplianceState { + // Default value. This value is unused. + COMPLIANCE_STATE_UNSPECIFIED = 0; + + // The resource is compliant. + COMPLIANT = 1; + + // The resource has a violation. + VIOLATION = 2; + + // The resource requires manual review from you. + MANUAL_REVIEW_NEEDED = 3; + + // An error occurred while computing the resource status. + ERROR = 4; + + // The resource can't be audited. + AUDIT_NOT_SUPPORTED = 5; +} + +// The request message for [GenerateFrameworkAuditScopeReport][]. +message GenerateFrameworkAuditScopeReportRequest { + // The set of options for the audit scope report format. + enum Format { + // Default value. This value is unused. + FORMAT_UNSPECIFIED = 0; + + // The report format is the Open Document Format (ODF). + ODF = 1; + } + + // Required. The organization, folder or project for the audit report. + // + // Supported formats are the following: + // + // * `projects/{project_id}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The format that the scope report bytes is returned in. + Format report_format = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The compliance framework that the scope report is generated for. + string compliance_framework = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response message for [GenerateFrameworkAuditScopeReport][]. +message GenerateFrameworkAuditScopeReportResponse { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/GenerateFrameworkAuditScopeReportResponse" + pattern: "projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}" + pattern: "organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}" + plural: "frameworkAuditScopeReports" + singular: "generateFrameworkAuditScopeReportResponse" + }; + + // The set of options that the audit scope report is exported in. + oneof audit_report { + // The audit scope report content in byte format. + bytes scope_report_contents = 3; + } + + // Identifier. The name of the audit report, in the format that was + // given in the request. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The compliance framework that the audit scope report is generated + // for. + string compliance_framework = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Additional information for an audit operation. +message ReportSummary { + // Output only. The total number of checks. + int32 total_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of compliant checks. + int32 compliant_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of checks with violations. + int32 violation_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of checks with "manual review needed" status. + int32 manual_review_needed_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of checks that can't be performed due to errors. + int32 error_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [CreateFrameworkAudit][]. +message CreateFrameworkAuditRequest { + // Required. The parent resource where this framework audit is created. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + ]; + + // Optional. The ID to use for the framework audit. The ID becomes the final + // component of the framework audit's full resource name. + // + // The ID must be between 4-63 characters, and valid characters + // are `\[a-z][0-9]-\`. + string framework_audit_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The framework audit to create. + FrameworkAudit framework_audit = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A destination for the framework audit. +message FrameworkAuditDestination { + // The type of destination. + oneof destination_type { + // The Cloud Storage bucket destination. + BucketDestination bucket = 1; + } +} + +// A Cloud Storage bucket destination. +message BucketDestination { + // The set of options for the framework audit format. + enum Format { + // Default value. This value is unused. + FORMAT_UNSPECIFIED = 0; + + // The format for the framework audit report is Open Document. + ODF = 1; + } + + // Required. The URI of the Cloud Storage bucket. + string bucket_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The format of the framework audit. + Format framework_audit_format = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A framework audit. +message FrameworkAudit { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + pattern: "projects/{project}/locations/{location}/frameworkAudits/{framework_audit}" + pattern: "organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}" + plural: "frameworkAudits" + singular: "frameworkAudit" + }; + + // The state of the framework audit. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The audit is scheduled. + SCHEDULED = 1; + + // The audit is running. + RUNNING = 2; + + // The audit results are being uploaded. + UPLOADING = 3; + + // The audit failed. + FAILED = 4; + + // The audit completed successfully. + SUCCEEDED = 5; + } + + // Output only. Identifier. The name of the framework audit. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. The ID of the framework audit. + string framework_audit_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The compliance framework used for the audit. + string compliance_framework = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The scope of the audit. + string scope = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The destination for the audit reports. + FrameworkAuditDestination framework_audit_destination = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time that the audit started. + google.protobuf.Timestamp start_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time that the audit finished. + google.protobuf.Timestamp finish_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The overall compliance state of the audit. + ComplianceState compliance_state = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the report. + ReportSummary report_summary = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The details for the cloud control groups within this audit. + repeated CloudControlGroupAuditDetails cloud_control_group_audit_details = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The details for the cloud controls within this audit. + repeated CloudControlAuditDetails cloud_control_audit_details = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The ID of the long-running operation. + string operation_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The framework audit state of the audit. + State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [ListFrameworkAudits][]. +message ListFrameworkAuditsRequest { + // Required. The parent resource where the framework audits are listed. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + ]; + + // Optional. The maximum number of framework audits to return. The service + // might return fewer audits than this value. If unspecified, a maximum of 10 + // framework audits are returned. The maximum value is 50; values above 50 are + // limited to 50. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `next_page_token` value that's returned from a previous list + // request, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filters to apply to the framework audits. + // Supported filters are `compliance_framework`, `compliance_state`, + // `create_time,` and `framework_audit_name`. If the filter is invalid, an + // invalid argument error is returned. + // For syntax details, see [AIP-160][https://google.aip.dev/160]. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListFrameworkAudits][]. +message ListFrameworkAuditsResponse { + // The framework audits. + repeated FrameworkAudit framework_audits = 1; + + // A token, which you can send as the `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request message for [GetFrameworkAudit][]. +message GetFrameworkAuditRequest { + // Required. The name of the framework audit to retrieve. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + // * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + // * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + ]; +} + +// The details for a cloud control group. +message CloudControlGroupAuditDetails { + // Output only. The ID of the cloud control group. + string cloud_control_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the cloud control group. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the cloud control group. + string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The responsibility type. + string responsibility_type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of Google's responsibility. + string google_responsibility_description = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The implementation of Google's responsibility. + string google_responsibility_implementation = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of your responsibility. + string customer_responsibility_description = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The implementation of your responsibility. + string customer_responsibility_implementation = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The compliance state of the control group. + ComplianceState compliance_state = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the regulatory control. + string control_id = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The control family. + ControlFamily control_family = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The details for the cloud controls within this group. + repeated CloudControlAuditDetails cloud_control_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the report. + ReportSummary report_summary = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details for a finding. +message FindingDetails { + // Output only. The name of the finding. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The compliance state of the finding. + ComplianceState compliance_state = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The observation details for the finding. + ObservationDetails observation = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The evidence details for the finding. + EvidenceDetails evidence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The observation details for a finding. +message ObservationDetails { + // Output only. The current value. + string current_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The expected value. + string expected_value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Any guidance for the observation. + string guidance = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The evidence details for a finding. +message EvidenceDetails { + // Output only. The resource identifier. + string resource = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The service identifier. + string service = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path to the evidence. + string evidence_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details for a cloud control audit. +message CloudControlAuditDetails { + // Output only. The name of the cloud control. + string cloud_control = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the cloud control. + string cloud_control_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the cloud control. + string cloud_control_description = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The overall status of the findings for the control. + ComplianceState compliance_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the report. + ReportSummary report_summary = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The findings for the control. + repeated FindingDetails findings = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto new file mode 100644 index 00000000000..bf41f21c650 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto @@ -0,0 +1,159 @@ +// Copyright 2025 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.cloudsecuritycompliance.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "CmEnrollmentServiceProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; + +// Service describing CmEnrollment related RPCs for +// complianceManager. +service CmEnrollmentService { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Updates the Compliance Manager enrollment for a resource to facilitate + // an audit. + // Use this method to enroll a resource in Compliance Manager or to + // create or update feature-specific configurations. + rpc UpdateCmEnrollment(UpdateCmEnrollmentRequest) returns (CmEnrollment) { + option (google.api.http) = { + patch: "/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}" + body: "cm_enrollment" + additional_bindings { + patch: "/v1/{cm_enrollment.name=folders/*/locations/*/cmEnrollment}" + body: "cm_enrollment" + } + additional_bindings { + patch: "/v1/{cm_enrollment.name=projects/*/locations/*/cmEnrollment}" + body: "cm_enrollment" + } + }; + option (google.api.method_signature) = "cm_enrollment,update_mask"; + } + + // Calculates the effective Compliance Manager enrollment for a resource. + // An effective enrollment is either a direct enrollment of a + // resource (if it exists), or an enrollment of the closest parent of a + // resource that's enrolled in Compliance Manager. + rpc CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest) + returns (CalculateEffectiveCmEnrollmentResponse) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/cmEnrollment}:calculate" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/cmEnrollment}:calculate" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for [UpdateCmEnrollment][]. +message UpdateCmEnrollmentRequest { + // Required. The Compliance Manager enrollment to update. + // The `name` field is used to identify the settings that you want to update. + CmEnrollment cm_enrollment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields that you want to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [CalculateEffectiveCmEnrollment][]. +message CalculateEffectiveCmEnrollmentRequest { + // Required. The name of the Compliance Manager enrollment to calculate. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}/cmEnrollment` + // * `folders/{folder_id}/locations/{location}/cmEnrollment` + // * `projects/{project_id}/locations/{location}/cmEnrollment` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/CmEnrollment" + } + ]; +} + +// The settings for Compliance Manager at a specific resource scope.= +message CmEnrollment { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/CmEnrollment" + pattern: "organizations/{organization}/locations/{location}/cmEnrollment" + pattern: "projects/{project}/locations/{location}/cmEnrollment" + plural: "cmEnrollments" + singular: "cmEnrollment" + }; + + // Identifier. The name of the Compliance Manager enrollment. + // + // Supported formats are the following: + // + // * `organizations/{organization_id}/locations/{location}/cmEnrollment` + // * `folders/{folder_id}/locations/{location}/cmEnrollment` + // * `projects/{project_id}/locations/{location}/cmEnrollment` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Whether the resource is enrolled in Compliance Manager. + // This setting is inherited by all descendants. + bool enrolled = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The audit configuration for Compliance Manager. + // If set at a scope, this configuration overrides any inherited audit + // configuration. + AuditConfig audit_config = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [CalculateEffectiveCmEnrollment][]. +message CalculateEffectiveCmEnrollmentResponse { + // The effective Compliance Manager enrollment for the resource. + CmEnrollment cm_enrollment = 1; +} + +// The audit configuration for Compliance Manager. +message AuditConfig { + // The destination details where audit reports are + // uploaded. + message CmEligibleDestination { + // Set of options for the report destination location. + oneof cm_eligible_destinations { + // The Cloud Storage bucket where audit reports and evidences can be + // uploaded. The format is `gs://{bucket_name}`. + string gcs_bucket = 1; + } + } + + // Required. The list of destinations that can be selected for uploading audit + // reports to. + repeated CmEligibleDestination destinations = 1 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto new file mode 100644 index 00000000000..4f950a71499 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto @@ -0,0 +1,810 @@ +// Copyright 2026 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.cloudsecuritycompliance.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; +option (google.api.resource_definition) = { + type: "cloudsecuritycompliance.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; + +// The responsibility type for the regulatory control. +enum RegulatoryControlResponsibilityType { + // Default value. This value is unused. + REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0; + + // Google's responsibility. + GOOGLE = 1; + + // Your responsibility. + CUSTOMER = 2; + + // Shared responsibility. + SHARED = 3; +} + +// The enforcement mode for the cloud control. +enum EnforcementMode { + // Default value. This value is unused. + ENFORCEMENT_MODE_UNSPECIFIED = 0; + + // The cloud control is enforced to prevent non-compliance. + PREVENTIVE = 1; + + // The cloud control is enforced to detect non-compliance. + DETECTIVE = 2; + + // The cloud control is enforced to audit for non-compliance. + AUDIT = 3; +} + +// The category for the framework. +enum FrameworkCategory { + // Default value. This value is unused. + FRAMEWORK_CATEGORY_UNSPECIFIED = 0; + + // An industry-defined framework. + INDUSTRY_DEFINED_STANDARD = 1; + + // An Assured Workloads framework. + ASSURED_WORKLOADS = 2; + + // A data security posture framework. + DATA_SECURITY = 3; + + // A Google's best practices framework. + GOOGLE_BEST_PRACTICES = 4; + + // A user-created framework. + CUSTOM_FRAMEWORK = 5; +} + +// The category for the cloud control. +enum CloudControlCategory { + // Default value. This value is unused. + CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0; + + // The infrastructure security category. + CC_CATEGORY_INFRASTRUCTURE = 1; + + // The artificial intelligence category. + CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2; + + // The physical security category. + CC_CATEGORY_PHYSICAL_SECURITY = 3; + + // The data security category. + CC_CATEGORY_DATA_SECURITY = 4; + + // The network security category. + CC_CATEGORY_NETWORK_SECURITY = 5; + + // The incident management category. + CC_CATEGORY_INCIDENT_MANAGEMENT = 6; + + // The identity and access management category. + CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7; + + // The encryption category. + CC_CATEGORY_ENCRYPTION = 8; + + // The logs management and infrastructure category. + CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9; + + // The HR, admin, and processes category. + CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10; + + // The third-party and sub-processor management category. + CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11; + + // The legal and disclosures category. + CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12; + + // The vulnerability management category. + CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13; + + // The privacy category. + CC_CATEGORY_PRIVACY = 14; + + // The business continuity and disaster recovery (BCDR) category. + CC_CATEGORY_BCDR = 15; + + // The admin access category. + CC_CATEGORY_ADMIN_ACCESS = 16; + + // DRZ (Data Residency). + CC_CATEGORY_DATA_RESIDENCY = 17; + + // RUR (Resource Usage Restriction). + CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18; + + // SERVICE SPECIFIC + CC_CATEGORY_SERVICE_SPECIFIC = 19; +} + +// The cloud provider that's associated with the cloud control. +enum CloudProvider { + // Default value. This value is unused. + CLOUD_PROVIDER_UNSPECIFIED = 0; + + // Amazon Web Services (AWS). + AWS = 1; + + // Microsoft Azure. + AZURE = 2; + + // Google Cloud. + GCP = 3; +} + +// The severity of the finding. +enum Severity { + // Default value. This value is unused. + SEVERITY_UNSPECIFIED = 0; + + // A critical vulnerability is easily discoverable by an external actor, + // exploitable, and results in the direct ability to execute arbitrary code, + // exfiltrate data, and otherwise gain additional access and privileges to + // cloud resources and workloads. Examples include publicly accessible + // unprotected user data and public SSH access with weak or no + // passwords. + // + // A critical threat is a threat that can access, modify, or delete data or + // execute unauthorized code within existing resources. + CRITICAL = 1; + + // A high-risk vulnerability can be easily discovered and exploited in + // combination with other vulnerabilities to gain direct access and + // the ability to execute arbitrary code, exfiltrate data, and otherwise + // gain additional access and privileges to cloud resources and workloads. + // An example is a database with weak or no passwords that is only + // accessible internally. This database could easily be compromised by an + // actor that had access to the internal network. + // + // A high-risk threat is a threat that can create new computational + // resources in an environment but can't access data or execute code in + // existing resources. + HIGH = 2; + + // A medium-risk vulnerability can be used by an actor to gain access to + // resources or privileges that enable them to eventually (through multiple + // steps or a complex exploit) gain access and the ability to execute + // arbitrary code or exfiltrate data. An example is a service account with + // access to more projects than it should have. If an actor gains access to + // the service account, they could potentially use that access to manipulate + // a project the service account was not intended to. + // + // A medium-risk threat can cause operational impact but might not + // access data or execute unauthorized code. + MEDIUM = 3; + + // A low-risk vulnerability hampers a security organization's ability to + // detect vulnerabilities or active threats in their deployment, or prevents + // the root cause investigation of security issues. An example is monitoring + // and logs being disabled for resource configurations and access. + // + // A low-risk threat is a threat that has obtained minimal access to an + // environment but can't access data, execute code, or create resources. + LOW = 4; +} + +// The action type of the rule. +enum RuleActionType { + // Default value. This value is unused. + RULE_ACTION_TYPE_UNSPECIFIED = 0; + + // The rule is intended to prevent non-compliance. + RULE_ACTION_TYPE_PREVENTIVE = 1; + + // The rule is intended to detect non-compliance. + RULE_ACTION_TYPE_DETECTIVE = 2; + + // The rule is intended to audit non-compliance. + RULE_ACTION_TYPE_AUDIT = 3; +} + +// The type of resource that a control or framework can be applied to. +enum TargetResourceType { + // Default value. This value is unused. + TARGET_RESOURCE_TYPE_UNSPECIFIED = 0; + + // The target resource is a Google Cloud organization. + TARGET_RESOURCE_CRM_TYPE_ORG = 1; + + // The target resource is a folder. + TARGET_RESOURCE_CRM_TYPE_FOLDER = 2; + + // The target resource is a project. + TARGET_RESOURCE_CRM_TYPE_PROJECT = 3; + + // The target resource is an application in App Hub. + TARGET_RESOURCE_TYPE_APPLICATION = 4; +} + +// A framework is a collection of cloud controls and regulatory controls +// that represent security best practices or industry-defined standards such as +// FedRAMP or NIST. +message Framework { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/Framework" + pattern: "organizations/{organization}/locations/{location}/frameworks/{framework}" + pattern: "projects/{project}/locations/{location}/frameworks/{framework}" + plural: "frameworks" + singular: "framework" + }; + + // The type of framework. + enum FrameworkType { + // Default value. This value is unused. + FRAMEWORK_TYPE_UNSPECIFIED = 0; + + // A framework that's provided and managed by Google. + BUILT_IN = 1; + + // A framework that's created and managed by you. + CUSTOM = 2; + } + + // Required. Identifier. The name of the framework, in one of the following + // formats: + // `organizations/{organization}/locations/{location}/frameworks/{framework}` + // or + // `projects/{project}/locations/{location}/frameworks/{framework}`. + // + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The major version of the framework, which is incremented in + // ascending order. + int64 major_revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The friendly name of the framework. The maximum length is 200 + // characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the framework. The maximum length is 2000 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The type of framework. + FrameworkType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The cloud control details that are directly added without any + // grouping in the framework. + repeated CloudControlDetails cloud_control_details = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The category of the framework. + repeated FrameworkCategory category = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The cloud providers that are supported by the framework. + repeated CloudProvider supported_cloud_providers = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The target resource types that are supported by the framework. + repeated TargetResourceType supported_target_resource_types = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The supported enforcement modes of the framework. + repeated EnforcementMode supported_enforcement_modes = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a cloud control. +message CloudControlDetails { + // Required. The name of the cloud control, in one of the following formats: + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + // or + // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + // + // The only supported location is `global`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The major version of the cloud control. + int64 major_revision_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Parameters are key-value pairs that let you provide your custom + // location requirements, environment requirements, or other settings that are + // relevant to the cloud control. An example parameter is + // `{"name": "location","value": "us-west-1"}`. + repeated Parameter parameters = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The reference of a framework, in one of the following formats: +// - `organizations/{organization}/locations/{location}/frameworks/{framework}` +// - `projects/{project}/locations/{location}/frameworks/{framework}`. +// +// The only supported location is `global`. +message FrameworkReference { + // Required. The major version of the framework. If not specified, the version + // corresponds to the latest version of the framework. + string framework = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/Framework" + } + ]; + + // Optional. The major version of the framework. If not specified, the version + // corresponds to the latest version of the framework. + optional int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Parameters are key-value pairs that let you provide your custom location +// requirements, environment requirements, or other settings that are +// relevant to the cloud control. +message Parameter { + // Required. The name or key of the parameter. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value of the parameter. + ParamValue parameter_value = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A cloud control is a set of rules and associated metadata that you can +// use to define your organization's security or compliance intent. +message CloudControl { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/CloudControl" + pattern: "organizations/{organization}/locations/{location}/cloudControls/{cloud_control}" + pattern: "projects/{project}/locations/{location}/cloudControls/{cloud_control}" + plural: "cloudControls" + singular: "cloudControl" + }; + + // The type of cloud control. + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // A cloud control that's created and managed by you. + CUSTOM = 1; + + // A cloud control that's provided and managed by Google. + BUILT_IN = 2; + } + + // Required. Identifier. The name of the cloud control, in either of the + // formats: + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + // or + // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + // + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The major version of the cloud control, which is incremented + // in ascending order. + int64 major_revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A description of the cloud control. The maximum length is 2000 + // characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The friendly name of the cloud control. The maximum length is 200 + // characters. + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The supported enforcement modes for the cloud control. + repeated EnforcementMode supported_enforcement_modes = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The parameter specifications for the cloud control. + repeated ParameterSpec parameter_spec = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The rules that you can enforce to meet your security or + // compliance intent. + repeated Rule rules = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The severity of the findings that are generated by the cloud + // control. + Severity severity = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The finding category for the cloud control findings. The maximum + // length is 255 characters. + string finding_category = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The supported cloud providers. + repeated CloudProvider supported_cloud_providers = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The frameworks that include this cloud control. + repeated string related_frameworks = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The remediation steps for the cloud control findings. The + // maximum length is 400 characters. + string remediation_steps = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The categories for the cloud control. + repeated CloudControlCategory categories = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time that the cloud control was last updated. + // `create_time` is used because a new cloud control is created + // whenever an existing cloud control is updated. + google.protobuf.Timestamp create_time = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The target resource types that are supported by the cloud + // control. + repeated TargetResourceType supported_target_resource_types = 18 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The parameter specification for the cloud control. +message ParameterSpec { + // The type of parameter value. + enum ValueType { + // Default value. This value is unused. + VALUE_TYPE_UNSPECIFIED = 0; + + // A string value. + STRING = 3; + + // A boolean value. + BOOLEAN = 4; + + // A string list value. + STRINGLIST = 5; + + // A numeric value. + NUMBER = 6; + + // A oneOf value. + ONEOF = 7; + } + + // Required. The name of the parameter. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The friendly name of the parameter. The maximum length is 200 + // characters. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the parameter. The maximum length is 2000 + // characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Whether the parameter is required. + bool is_required = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The parameter value type. + ValueType value_type = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The default value of the parameter. + ParamValue default_value = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of parameter substitutions. + repeated ParameterSubstitutionRule substitution_rules = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The parameter specification for `oneOf` attributes. + repeated ParameterSpec sub_parameters = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The permitted set of values for the parameter. + Validation validation = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// The validation of the parameter. +message Validation { + // Defines validators for parameter values. + oneof constraint { + // The permitted set of values for the parameter. + AllowedValues allowed_values = 1; + + // The permitted range for numeric parameters. + IntRange int_range = 2; + + // The regular expression for string parameters. + RegexpPattern regexp_pattern = 3; + } +} + +// The allowed set of values for the parameter. +message AllowedValues { + // Required. The list of allowed values for the parameter. + repeated ParamValue values = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The regular expression (regex) validator for parameter values. +message RegexpPattern { + // Required. The regex pattern to match the values of the parameter with. + string pattern = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The number range for number parameters. +message IntRange { + // Required. The minimum permitted value for the numeric parameter + // (inclusive). + int64 min = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum permitted value for the numeric parameter + // (inclusive). + int64 max = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A list of strings for the parameter value. +message StringList { + // Required. The strings in the list. + repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The possible parameter value types. +message ParamValue { + // The list of possible parameter value types. + oneof kind { + // Optional. A string value. + string string_value = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A boolean value. + bool bool_value = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A repeated string. + StringList string_list_value = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A double value. + double number_value = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sub-parameter values. + Parameter oneof_value = 7 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// The parameter substitution rules. +message ParameterSubstitutionRule { + // The type of substitution. + oneof substitution_type { + // The placeholder substitution rule. + PlaceholderSubstitutionRule placeholder_substitution_rule = 1; + + // The attribute substitution rule. + AttributeSubstitutionRule attribute_substitution_rule = 2; + } +} + +// The attribute at the given path that's substituted entirely. +message AttributeSubstitutionRule { + // The fully qualified proto attribute path, in dot notation. + // For example: `rules[0].cel_expression.resource_types_values` + string attribute = 1; +} + +// The placeholder that's substituted in the rendered string. +message PlaceholderSubstitutionRule { + // The fully qualified proto attribute path, in dot notation. + string attribute = 1; +} + +// A rule in the cloud control. +message Rule { + // The rule implementation. + oneof implementation { + // The rule's logic expression in Common Expression Language (CEL). + CELExpression cel_expression = 1; + } + + // Optional. The rule description. The maximum length is 2000 characters. + string description = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The functionality that's enabled by the rule. + repeated RuleActionType rule_action_types = 16 + [(google.api.field_behavior) = REQUIRED]; +} + +// A Common Expression Language (CEL) expression that's used to create a rule. +message CELExpression { + // The criteria of the CEL expression. + oneof criteria { + // The resource instance types on which this expression is defined. + // The format is `/`. + // For example: `compute.googleapis.com/Instance` + StringList resource_types_values = 3; + } + + // Required. The logical expression in CEL. The maximum length of the + // condition is 1000 characters. For more information, see [CEL + // expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions). + string expression = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for 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. The server-defined resource path for the target of the + // operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the verb that was executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The 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 that the operation + // be cancelled. If an operation was cancelled successfully, then the field + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED]. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The API version that was used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The regulatory control. +message Control { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/Control" + pattern: "organizations/{organization}/locations/{location}/controls/{control}" + pattern: "projects/{project}/locations/{location}/controls/{control}" + plural: "controls" + singular: "control" + }; + + // The regulatory control family. + enum Family { + // Default value. This value is unused. + FAMILY_UNSPECIFIED = 0; + + // Access control + AC = 1; + + // Awareness and araining + AT = 2; + + // Audit and accountability + AU = 3; + + // Certification, accreditation, and security assessments + CA = 4; + + // Configuration management + CM = 5; + + // Contingency planning + CP = 6; + + // Identification and authentication + IA = 7; + + // Incident response + IR = 8; + + // Maintenance + MA = 9; + + // Media protection + MP = 10; + + // Physical and environmental protection + PE = 11; + + // Security planning + PL = 12; + + // Personnel aecurity + PS = 13; + + // Risk assessment + RA = 14; + + // System services and acquisition + SA = 15; + + // System and communications protection + SC = 16; + + // System and information integrity + SI = 17; + + // Supply chain risk management + SR = 18; + } + + // Output only. The name of a regulatory control, in one of the following + // formats: + // - `organizations/{organization}/locations/{location}/controls/{control}` + // - `projects/{project}/locations/{location}/controls/{control}`. + // + // The only supported location is `global`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The friendly name for the regulatory control. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the regulatory control. + string description = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The regulatory group that the control belongs to. + Family family = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The regulatory family that the control belongs to. + ControlFamily control_family = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The entity that's responsible for the control, whether Google, + // you as the customer, or both. + RegulatoryControlResponsibilityType responsibility_type = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of Google's responsibility for the regulatory + // control. + string google_responsibility_description = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of Google's responsibility for implementing the + // regulatory control. + string google_responsibility_implementation = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of your responsibility for the regulatory + // control. + string customer_responsibility_description = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of the your responsibility for implementing the + // regulatory control. + string customer_responsibility_implementation = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of the responsibility that's shared between + // Google and you in implementing this control. + string shared_responsibility_description = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A link to the documentation that's related to this control. + string additional_content_uri = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The frameworks that include this control. + repeated string related_frameworks = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The regulatory family of the control. +message ControlFamily { + // The identifier for the regulatory control family. + string family_id = 1; + + // The friendly name for the regulatory control family. + string display_name = 2; +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto new file mode 100644 index 00000000000..85c153b90b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto @@ -0,0 +1,456 @@ +// Copyright 2026 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "ConfigProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; + +// Config Service manages compliance frameworks, cloud controls, and their +// configurations. +service Config { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the frameworks (both built-in and custom) that are available within + // the parent resource. The latest major version of each framework is + // returned. + // This method supports pagination. + rpc ListFrameworks(ListFrameworksRequest) returns (ListFrameworksResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/frameworks" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworks" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a framework. + // This method retrieves the latest major version of the framework. + // + // To retrieve a specific major version, include `major_revision_id` in + // the request. + rpc GetFramework(GetFrameworkRequest) returns (Framework) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworks/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworks/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a custom framework in a given parent resource. + // You can't create built-in frameworks because those are managed by + // Google. + rpc CreateFramework(CreateFrameworkRequest) returns (Framework) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/locations/*}/frameworks" + body: "framework" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/frameworks" + body: "framework" + } + }; + option (google.api.method_signature) = "parent,framework,framework_id"; + } + + // Updates a custom framework. + // This method allows for partial updates of a framework. Use the + // `update_mask` to specify which fields to update. Consider the following: + // + // - If you provide an `update_mask`, only the fields that are specified + // in the mask are updated. + // - If you don't provide an `update_mask`, all the fields that are present + // in the request's `framework` body are used to overwrite the existing + // resource. + // + // You can only update frameworks with the `CUSTOM` type. + // A successful update creates a new version of the framework. + rpc UpdateFramework(UpdateFrameworkRequest) returns (Framework) { + option (google.api.http) = { + patch: "/v1/{framework.name=organizations/*/locations/*/frameworks/*}" + body: "framework" + additional_bindings { + patch: "/v1/{framework.name=projects/*/locations/*/frameworks/*}" + body: "framework" + } + }; + option (google.api.method_signature) = "framework,update_mask"; + } + + // Deletes a custom framework, including all its major and + // minor revisions. Consider the following: + // + // - You can't delete built-in frameworks. You can only delete frameworks + // with type `CUSTOM`. + // - You can't delete frameworks that are deployed to a resource. + // - You can't restore a deleted framework. This action is permanent. + rpc DeleteFramework(DeleteFrameworkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=organizations/*/locations/*/frameworks/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/frameworks/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists the cloud controls (both built-in and custom) that are available + // in a given parent resource. The latest major version of each cloud control + // is returned. + // This method supports pagination. + rpc ListCloudControls(ListCloudControlsRequest) + returns (ListCloudControlsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/cloudControls" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/cloudControls" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a cloud control. + // This method retrieves the latest major version of a cloud control that + // you identify by name. + // + // By default, the latest major version of the cloud control is returned. + // To retrieve a specific major version, include `major_revision_id` in + // the request. + rpc GetCloudControl(GetCloudControlRequest) returns (CloudControl) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/cloudControls/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/cloudControls/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a custom cloud control in a given parent + // resource. + // You can't create built-in cloud controls because those are managed by + // Google. + rpc CreateCloudControl(CreateCloudControlRequest) returns (CloudControl) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/locations/*}/cloudControls" + body: "cloud_control" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/cloudControls" + body: "cloud_control" + } + }; + option (google.api.method_signature) = + "parent,cloud_control,cloud_control_id"; + } + + // Updates a custom cloud control. + // This method allows for partial updates of a cloud control. Use the + // `update_mask` to specify which fields to update. Consider the following: + // + // - If you provide an `update_mask`, only the fields that are specified + // in the mask are updated. + // - If you don't provide an `update_mask`, all the fields that are present + // in the request's `cloud_control` body are used to overwrite the existing + // resource. + // + // You can only update cloud controls with the `CUSTOM` type. + // A successful update creates a new version of the cloud control. + rpc UpdateCloudControl(UpdateCloudControlRequest) returns (CloudControl) { + option (google.api.http) = { + patch: "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}" + body: "cloud_control" + additional_bindings { + patch: "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}" + body: "cloud_control" + } + }; + option (google.api.method_signature) = "cloud_control,update_mask"; + } + + // Deletes a custom cloud control, including all its + // major and minor revisions. Consider the following: + // + // - You can't delete built-in cloud controls. You can only delete cloud + // controls with type `CUSTOM`. + // - You can't delete cloud controls if any of the versions are referenced + // by a framework. + // - You can't restore a deleted cloud control. This action is permanent. + rpc DeleteCloudControl(DeleteCloudControlRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=organizations/*/locations/*/cloudControls/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/cloudControls/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for [ListFrameworks][]. +message ListFrameworksRequest { + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}` + // - `projects/{project}/locations/{location}`. + // + // The only supported location is `global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/Framework" + } + ]; + + // Optional. The maximum number of frameworks to return. The default value is + // `500`. + // + // If you exceed the maximum value of `1000`, then the service uses the + // maximum value. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request to list + // frameworks. Provide this token to retrieve the next page of results. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListFrameworks][]. +// Returns a paginated list of Framework resources. +message ListFrameworksResponse { + // The list of framework resources. + repeated Framework frameworks = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// The request message for [GetFramework][]. +message GetFrameworkRequest { + // Required. The name of the framework to retrieve, in one of the following + // formats: + // `organizations/{organization}/locations/{location}/frameworks/{framework}` + // or + // `projects/{project}/locations/{location}/frameworks/{framework}`. + // + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/Framework" + } + ]; + + // Optional. The framework major version to retrieve. If not specified, the + // most recently updated `revision_id` is retrieved. + int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [CreateFramework][]. +message CreateFrameworkRequest { + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}` + // - `projects/{project}/locations/{location}`. + // + // The only supported location is `global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/Framework" + } + ]; + + // Required. The identifier (ID) of the framework. The ID is not the full name + // of the framework; it's the last part of the full name of the framework. + string framework_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created. + Framework framework = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [UpdateFramework][]. +message UpdateFrameworkRequest { + // Optional. A field mask is used to specify the fields to be overwritten in + // the framework resource by the update. The fields specified in the + // `update_mask` are relative to the resource, not the full request. A field + // is overwritten if it is in the mask. If you don't provide a mask then all + // fields present in the request will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource that is being updated. + Framework framework = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The major version ID of the framework to update. + int64 major_revision_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [DeleteFramework][]. +message DeleteFrameworkRequest { + // Required. The name of the resource, in one of the following formats: + // `organizations/{organization}/locations/{location}/frameworks/{framework}` + // or + // `projects/{project}/locations/{location}/frameworks/{framework}`. + // + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/Framework" + } + ]; +} + +// Request message for [ListCloudControls][]. +message ListCloudControlsRequest { + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}` + // - `projects/{project}/locations/{location}`. + // + // The only supported location is `global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/CloudControl" + } + ]; + + // Optional. The maximum number of cloud controls to return. The default value + // is `500`. + // + // If you exceed the maximum value of `1000`, then the service uses the + // maximum value. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token that's returned from a previous request to + // list cloud controls. Provide this token to retrieve the next page of + // results. + // + // When paginating, the parent that you provide to the + // [ListCloudControls][google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls] + // request must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListCloudControls][]. +message ListCloudControlsResponse { + // The list of CloudControl resources. + repeated CloudControl cloud_controls = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// The request message for [GetCloudControl][]. +message GetCloudControlRequest { + // Required. The name of the cloud control to retrieve, in one of the + // following formats: + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + // or + // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + // + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/CloudControl" + } + ]; + + // Optional. The major version of the cloud control to retrieve. If not + // specified, the most recently updated `revision_id` is retrieved. + int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [CreateCloudControl][]. +message CreateCloudControlRequest { + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}`. + // - `projects/{project}/locations/{location}`. + // + // The only supported location is `global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/CloudControl" + } + ]; + + // Required. The identifier for the cloud control, which is the last segment + // of the cloud control name. The format is + // `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. + string cloud_control_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The cloud control that's being created. + CloudControl cloud_control = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [UpdateCloudControl][]. +message UpdateCloudControlRequest { + // Optional. Use a field mask to specify the fields to be overwritten in the + // cloud control during the update. + // The fields that you specify in the `update_mask` are relative to the + // cloud control, not the full request. A field is overwritten if it is in + // the mask. If you don't provide a mask, all fields in the request + // are updated. + // + // You can update the following fields: + // + // - Display name + // - Description + // - Parameters + // - Rules + // - Parameter specification + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The cloud control that you're updating. + CloudControl cloud_control = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [DeleteCloudControl][]. +message DeleteCloudControlRequest { + // Required. The name of the cloud control to delete, in one of the following + // formats: + // `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + // or + // `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + // + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/CloudControl" + } + ]; +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto new file mode 100644 index 00000000000..be772f7cfb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto @@ -0,0 +1,620 @@ +// Copyright 2026 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "DeploymentProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; + +// Deployment service allows users to manage deployments of Frameworks and +// Cloud Controls on a target resource. +service Deployment { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a framework deployment in a given parent resource. A + // framework deployment lets you assign a particular framework version to an + // organization, folder, or project so that you can control and monitor + // those resources using the framework's cloud controls. + rpc CreateFrameworkDeployment(CreateFrameworkDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/locations/*}/frameworkDeployments" + body: "framework_deployment" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/frameworkDeployments" + body: "framework_deployment" + } + }; + option (google.api.method_signature) = + "parent,framework_deployment,framework_deployment_id"; + option (google.longrunning.operation_info) = { + response_type: "FrameworkDeployment" + metadata_type: "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + }; + } + + // Deletes a framework deployment. + rpc DeleteFrameworkDeployment(DeleteFrameworkDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + }; + } + + // Gets details about a framework deployment. + rpc GetFrameworkDeployment(GetFrameworkDeploymentRequest) + returns (FrameworkDeployment) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists the framework deployments in a given parent resource. + rpc ListFrameworkDeployments(ListFrameworkDeploymentsRequest) + returns (ListFrameworkDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/frameworkDeployments" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworkDeployments" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a cloud control deployment. + rpc GetCloudControlDeployment(GetCloudControlDeploymentRequest) + returns (CloudControlDeployment) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists the cloud conrol deployments in a given parent resource. + rpc ListCloudControlDeployments(ListCloudControlDeploymentsRequest) + returns (ListCloudControlDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/cloudControlDeployments" + } + }; + option (google.api.method_signature) = "parent"; + } +} + +// The state of the deployment resource. +enum DeploymentState { + // Default value. This value is unused. + DEPLOYMENT_STATE_UNSPECIFIED = 0; + + // Validating the deployment. + DEPLOYMENT_STATE_VALIDATING = 1; + + // Deployment is being created. + DEPLOYMENT_STATE_CREATING = 2; + + // Deployment is being deleted. + DEPLOYMENT_STATE_DELETING = 3; + + // Deployment is being updated. + DEPLOYMENT_STATE_UPDATING = 8; + + // Deployment has failed. All the changes made by the deployment were + // successfully rolled back. You can retry or delete a deployment that's + // in this state. + DEPLOYMENT_STATE_FAILED = 4; + + // Deployment is successful and ready to use. + DEPLOYMENT_STATE_READY = 5; + + // Deployment is partially deployed. All the cloud controls weren't deployed + // successfully. Retrying the operation resumes from the first failed + // step. + DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6; + + // Deployment is partially deleted. All the cloud control deployments weren't + // deleted successfully. Retrying the operation resumes from the first + // failed step. + DEPLOYMENT_STATE_PARTIALLY_DELETED = 7; +} + +// Framework deployments represent the assignment of a framework to a target +// resource. Supported target resources are organizations, folders, and +// projects. +message FrameworkDeployment { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + pattern: "organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}" + pattern: "projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}" + plural: "frameworkDeployments" + singular: "frameworkDeployment" + }; + + // Identifier. The name of the framework deployment, in the format + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + // The only supported location is `global`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The details of the target resource that you want to deploy the + // framework to. You can specify an existing resource, or create a new one. + TargetResourceConfig target_resource_config = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The target resource to deploy the framework to, in one the + // following formats: + // + // - `organizations/{organizationID}` + // - `folders/{folderID}` + // - `projects/{projectID}` + string computed_target_resource = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A reference to the framework that you're deploying. + FrameworkReference framework = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A user-provided description of the framework deployment. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The deployment mode and parameters for each of the cloud controls + // in the framework. Every cloud control in the framework includes metadata. + repeated CloudControlMetadata cloud_control_metadata = 6 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The state for the framework deployment. + DeploymentState deployment_state = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the resource was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the resource last updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. To prevent concurrent updates from overwriting each other, always + // provide the `etag` when you update a framework deployment. You can also + // provide the `etag` when you delete a framework deployment, to help + // ensure that you're deleting the intended version of the + // framework deployment. + string etag = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The display name of the target resource. + string target_resource_display_name = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The references to the cloud control deployments. The reference + // includes all the cloud control deployments that are in the framework or in + // a cloud control group. + // + // For example, if a framework deployment deploys two + // cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the + // references are: + // + // ``` + // { + // cloud_control_deployment_reference: { + // cloud_control_deployment: + // "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-1" + // }, + // cloud_control_deployment_reference: { + // cloud_control_deployment: + // "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-2" + // } + // ``` + repeated CloudControlDeploymentReference cloud_control_deployment_references = + 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A cloud control deployment represents the deployment of a particular cloud +// control on a target resource. Supported target resources are +// `organizations/{organizationID}`, `folders/{folderID}`, and +// `projects/{projectID}`. +message CloudControlDeployment { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" + pattern: "organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}" + pattern: "projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}" + plural: "cloudControlDeployments" + singular: "cloudControlDeployment" + }; + + // Identifier. The name for the cloud control deployment, in the format + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + // or + // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + // The only supported location is `global`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The details of the target resource that the cloud control is + // deployed You can use an existing target resource or create a new target. + TargetResourceConfig target_resource_config = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The resource that the cloud control is deployed on, in one of + // the following formats: + // + // - `organizations/{organizationID}` + // - `folders/{folderID}` + // - `projects/{projectID}` + string target_resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The deployment mode and parameters for the cloud control. + CloudControlMetadata cloud_control_metadata = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A friendly description for the cloud control deployment. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of the cloud control deployment. + DeploymentState deployment_state = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the resource was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the resource was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. To prevent concurrent updates from overwriting each other, + // provide the `etag` when you update a cloud control deployment. You can also + // provide the `etag` when you delete a cloud control deployment to help + // ensure that you're deleting the intended version of the + // deployment. + string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The cloud control after the given parameters are substituted. + CloudControl parameter_substituted_cloud_control = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The references to the framework deployments that this cloud + // control deployment is part of. A cloud control deployment can be part of + // multiple framework deployments. + repeated FrameworkDeploymentReference framework_deployment_references = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the target resource. + string target_resource_display_name = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The name of the target resource or the configuration that's required to +// create a new target resource. +message TargetResourceConfig { + // The resource configuration for the target resource. + oneof resource_config { + // Optional. The resource hierarchy node, in one of the following formats: + // + // - `organizations/{organizationID}` + // - `folders/{folderID}` + // - `projects/{projectID}` + string existing_target_resource = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The details that are required to create a resource and use + // that resource as the target resource for deployment. + TargetResourceCreationConfig target_resource_creation_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// The configuration that's required to create a target resource. +message TargetResourceCreationConfig { + // The configuration that's required to create the target resource. + oneof resource_creation_config { + // Optional. The configuration that's required to create a folder. + FolderCreationConfig folder_creation_config = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration that's required to create a project. + ProjectCreationConfig project_creation_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// The configuration that's required to create a folder to be used +// as the target resource for a deployment. +message FolderCreationConfig { + // Required. The parent of the folder, in the format + // `organizations/{organizationID}` or `folders/{folderID}`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The display name of the folder. + string folder_display_name = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The configuration that's required to create a project to be used +// as the target resource of a deployment. +message ProjectCreationConfig { + // Required. The parent of the project, in the format + // `organizations/{organizationID}` or `folders/{folderID}`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The display name of the project. + string project_display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The billing account ID for the project. + string billing_account_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The enforcement mode and parameters of a cloud +// control deployment. +message CloudControlMetadata { + // Required. The cloud control name and parameters. + CloudControlDetails cloud_control_details = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The enforcement mode of the cloud control. + EnforcementMode enforcement_mode = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [CreateFrameworkDeployment][]. +message CreateFrameworkDeploymentRequest { + // Required. The parent resource of the framework deployment in the format + // `organizations/{organization}/locations/{location}` + // or + // `projects/{project}/locations/{location}`. + // Only the global location is supported. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + ]; + + // Optional. An identifier for the framework deployment that's unique in scope + // of the parent. If you don't specify a value, then a random UUID is + // generated. + string framework_deployment_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The framework deployment that you're creating. + FrameworkDeployment framework_deployment = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [DeleteFrameworkDeployment][]. +message DeleteFrameworkDeploymentRequest { + // Required. The name of the framework deployment that you want to delete, + // in the format + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + ]; + + // Optional. An opaque identifier for the current version of the resource. + // + // If you provide this value, then it must match the existing value. If the + // values don't match, then the request fails with an + // [`ABORTED`][google.rpc.Code.ABORTED] error. + // + // If you omit this value, then the resource is deleted regardless of its + // current `etag` value. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [GetFrameworkDeployment][]. +message GetFrameworkDeploymentRequest { + // Required. The name of the framework deployment, in the format + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + ]; +} + +// The request message for [ListFrameworkDeployments][]. +message ListFrameworkDeploymentsRequest { + // Required. The parent resource of the framework deployment, in the format + // `organizations/{organization}/locations/{location}` + // or + // `projects/{project}/locations/{location}`. + // The only supported location is `global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + ]; + + // Optional. The requested page size. The server might return fewer items than + // requested. + // If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies a page of results the server should + // return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to be applied on the resource, as defined by + // [AIP-160: Filtering](https://google.aip.dev/160). + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sort order for the results. The following values are + // supported: + // + // * `name` + // * `name desc` + // + // If you do not specify a value, then the results are not sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListFrameworkDeployments][]. +message ListFrameworkDeploymentsResponse { + // The list of framework deployments. + repeated FrameworkDeployment framework_deployments = 1; + + // A token that identifies the next page of results that the server + // should return. + string next_page_token = 2; +} + +// The request message for [GetCloudControlDeployment][]. +message GetCloudControlDeploymentRequest { + // Required. The name for the cloud control deployment, in the format + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + // or + // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + // The only supported location is `global`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" + } + ]; +} + +// The request message for [ListCloudControlDeployments][]. +message ListCloudControlDeploymentsRequest { + // Required. The parent resource for the cloud control deployment, in the + // format `organizations/{organization}/locations/{location}` or + // `projects/{project}/locations/{location}`. + // The only supported location is `global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" + } + ]; + + // Optional. The requested page size. The server might return fewer items than + // you requested. + // If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies the page of results that the server + // should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply on the resource, as defined by + // [AIP-160: Filtering](https://google.aip.dev/160). + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sort order for the results. The following values are + // supported: + // + // * `name` + // * `name desc` + // + // If you do not specify a value, then the results are not sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListCloudControlDeployments][]. +message ListCloudControlDeploymentsResponse { + // The list of cloud control deployments. + repeated CloudControlDeployment cloud_control_deployments = 1; + + // A token that identifies the next page of results that the server + // should return. + string next_page_token = 2; +} + +// The reference to a cloud control deployment. +message CloudControlDeploymentReference { + // Output only. The name of the CloudControlDeployment. The format is + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + // or + // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + // The only supported location is `global`. + string cloud_control_deployment = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" + } + ]; +} + +// The reference to a framework deployment. +message FrameworkDeploymentReference { + // Output only. The name of the framework deployment, in the format + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + // The only supported location is `global`. + string framework_deployment = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + ]; + + // Optional. The reference to the framework that this deployment is for. + // For example: + // + // ``` + // { + // framework: + // "organizations/{organization}/locations/{location}/frameworks/{framework}", + // major_revision_id: 1 + // } + // ``` + // + // The only supported location is `global`. + FrameworkReference framework_reference = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The display name of the framework that this framework deployment + // is for. + string framework_display_name = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto new file mode 100644 index 00000000000..b2a5c3eae33 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto @@ -0,0 +1,670 @@ +// Copyright 2026 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; +option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; +option java_multiple_files = true; +option java_outer_classname = "MonitoringProto"; +option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; +option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; +option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; +option (google.api.resource_definition) = { + type: "cloudsecuritycompliance.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; + +// Service describing handlers for resources +service Monitoring { + option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the framework compliance summary for a given scope. + rpc ListFrameworkComplianceSummaries(ListFrameworkComplianceSummariesRequest) + returns (ListFrameworkComplianceSummariesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummaries" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/frameworkComplianceSummaries" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists the finding summary by category for a given scope. + rpc ListFindingSummaries(ListFindingSummariesRequest) + returns (ListFindingSummariesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*}/findingSummaries" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/findingSummaries" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/findingSummaries" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Fetches the framework compliance report for a given scope. + rpc FetchFrameworkComplianceReport(FetchFrameworkComplianceReportRequest) + returns (FrameworkComplianceReport) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetch" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetch" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists the control compliance summary for a given scope. + rpc ListControlComplianceSummaries(ListControlComplianceSummariesRequest) + returns (ListControlComplianceSummariesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the aggregated compliance report over time for a given scope. + rpc AggregateFrameworkComplianceReport( + AggregateFrameworkComplianceReportRequest) + returns (AggregateFrameworkComplianceReportResponse) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregate" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregate" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// The evaluation state of the control. +enum EvaluationState { + // Default value. This value is unused. + EVALUATION_STATE_UNSPECIFIED = 0; + + // The control is passing. + EVALUATION_STATE_PASSED = 1; + + // The control is failing. + EVALUATION_STATE_FAILED = 2; + + // The control is not assessed. + EVALUATION_STATE_NOT_ASSESSED = 3; +} + +// A finding is a record of assessment data like security, risk, health, or +// privacy. +enum FindingClass { + // Default value. This value is unused. + FINDING_CLASS_UNSPECIFIED = 0; + + // The activity is unwanted or malicious. + THREAT = 1; + + // A potential weakness in software that increases risk to + // confidentiality, integrity, and availability. + VULNERABILITY = 2; + + // A potential weakness in a cloud resource or asset configuration that + // increases risk. + MISCONFIGURATION = 3; + + // A security observation that is for informational purposes. + OBSERVATION = 4; + + // An error that prevents Security Command Center from functioning properly. + SCC_ERROR = 5; + + // A potential security risk that's due to a change in the security + // posture. + POSTURE_VIOLATION = 6; + + // A combination of security issues that represent a more severe + // security problem when taken together. + TOXIC_COMBINATION = 7; + + // A potential security risk to data assets that contain sensitive + // data. + SENSITIVE_DATA_RISK = 8; + + // A resource or resource group where high risk attack paths + // converge, based on attack path simulations (APS). + CHOKEPOINT = 9; +} + +// Specifies the view of the framework compliance summary to be returned. +// New values may be added in the future. +enum FrameworkComplianceSummaryView { + // The default / unset value. The API will default to the BASIC view. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0; + + // Includes basic compliance metadata, but omits trend data. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1; + + // Includes all information, including + // [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count] + // and + // [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend]. + // Trend data is provided for the last 30 days. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2; +} + +// The request message for +// [ListFrameworkComplianceSummariesRequest][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest]. +message ListFrameworkComplianceSummariesRequest { + // Required. The parent scope for the framework compliance summary. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" + } + ]; + + // Optional. The requested page size. The server might return fewer items than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies the page of results that the server + // should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the level of detail to return in the response. + FrameworkComplianceSummaryView view = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [ListFrameworkComplianceSummariesResponse][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse]. +message ListFrameworkComplianceSummariesResponse { + // The list of framework compliance summaries. + repeated FrameworkComplianceSummary framework_compliance_summaries = 1; + + // Output only. The token to retrieve the next page of results. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The response message for [GetFrameworkComplianceReport][]. +message FrameworkComplianceReport { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + pattern: "projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" + pattern: "folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" + pattern: "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" + plural: "frameworkComplianceReports" + singular: "frameworkComplianceReport" + }; + + // The name of the framework. + string framework = 1; + + // The description of the framework. + string framework_description = 2; + + // Output only. The last updated time of the report. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The control assessment details of the framework. + ControlAssessmentDetails control_assessment_details = 4; + + // The type of framework. + Framework.FrameworkType framework_type = 5; + + // The list of cloud providers supported by the framework. + repeated CloudProvider supported_cloud_providers = 6; + + // The list of framework categories supported. + repeated FrameworkCategory framework_categories = 7; + + // Optional. The display name for the framework. + string framework_display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Identifier. The name of the framework compliance report. + string name = 9 [(google.api.field_behavior) = IDENTIFIER]; + + // The latest major revision ID of the framework. + int64 major_revision_id = 10; + + // The latest minor revision ID of the latest major revision of the framework. + int64 minor_revision_id = 11; + + // The target resource details of the framework. + repeated TargetResourceDetails target_resource_details = 12; +} + +// The request message for [FetchFrameworkComplianceReport][]. +message FetchFrameworkComplianceReportRequest { + // Required. The name of the framework compliance report to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + } + ]; + + // Optional. The end time of the report. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [ListFindingSummaries][]. +message ListFindingSummariesRequest { + // Required. The parent scope for the framework overview page. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/FindingSummary" + } + ]; + + // Optional. The requested page size. The server might return fewer items than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies the page of results that the server + // should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The end time of the finding summary. + google.protobuf.Timestamp end_time = 5 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListFindingSummaries][]. +message ListFindingSummariesResponse { + // List of finding summary by category. + repeated FindingSummary finding_summaries = 1; + + // Output only. The token to retrieve the next page of results. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [ListControlComplianceSummaries][]. +message ListControlComplianceSummariesRequest { + // Required. The parent scope for the framework overview page. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" + } + ]; + + // Optional. The end time of the control compliance summary. + google.protobuf.Timestamp end_time = 2 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. The requested page size. The server might return fewer items than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token that identifies the page of results that the server + // should return. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [ListControlComplianceSummaries][]. +message ListControlComplianceSummariesResponse { + // The list of control compliance details. + repeated ControlComplianceSummary control_compliance_summaries = 1; + + // Output only. The token to retrieve the next page of results. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [AggregateFrameworkComplianceReport][]. +message AggregateFrameworkComplianceReportRequest { + // Required. The name of the aggregated compliance report over time to + // retrieve. + // + // The supported format is: + // `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + } + ]; + + // Optional. The start and end time range for the aggregated compliance + // report. + google.type.Interval interval = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [AggregateFrameworkComplianceReport][]. +message AggregateFrameworkComplianceReportResponse { + // The list of aggregated compliance reports. + repeated AggregatedComplianceReport aggregated_compliance_reports = 1; +} + +// The details for a control assessment. +message ControlAssessmentDetails { + // The number of controls that are passing or not assessed. + int32 passing_controls = 1; + + // The number of controls that are failing. + int32 failing_controls = 2; + + // The number of controls that were assessed and are passing. + int32 assessed_passing_controls = 3; + + // The number of controls that aren't assessed because they require manual + // review. + int32 not_assessed_controls = 4; +} + +// The details for a framework compliance summary. +message FrameworkComplianceSummary { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" + pattern: "projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" + pattern: "folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" + pattern: "organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" + plural: "frameworkComplianceSummaries" + singular: "frameworkComplianceSummary" + }; + + // The name of the framework. + string framework = 1; + + // The control assessment details of the framework. + ControlAssessmentDetails control_assessment_details = 2; + + // The type of framework. + Framework.FrameworkType framework_type = 3; + + // The list of cloud providers supported by the framework. + repeated CloudProvider supported_cloud_providers = 4; + + // The list of framework categories supported by the framework. + repeated FrameworkCategory framework_categories = 5; + + // Optional. The display name for the framework. + string framework_display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Identifier. The name of the framework compliance summary. + string name = 7 [(google.api.field_behavior) = IDENTIFIER]; + + // The major revision ID of the framework. + int64 major_revision_id = 8; + + // The minor revision ID of the framework. + int64 minor_revision_id = 9; + + // The target resource details for the framework. + repeated TargetResourceDetails target_resource_details = 10; + + // Output only. The count of the findings generated against the framework. + int64 finding_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The trend of controls that are passing for the given duration. + Trend controls_passing_trend = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details for a finding. +message FindingSummary { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/FindingSummary" + pattern: "projects/{project}/locations/{location}/findingSummaries/{finding_summary}" + pattern: "folders/{folder}/locations/{location}/findingSummaries/{finding_summary}" + pattern: "organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}" + plural: "findingSummaries" + singular: "findingSummary" + }; + + // The category of the finding. + string finding_category = 1; + + // The class of the finding. + FindingClass finding_class = 2; + + // The severity of the finding. + Severity severity = 3; + + // The count of the finding. + int64 finding_count = 4; + + // Output only. The last updated time of the finding. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The list of compliance frameworks that the finding belongs to. + repeated string related_frameworks = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Identifier. The name of the finding summary. + string name = 7 [(google.api.field_behavior) = IDENTIFIER]; +} + +// The details for control compliance. +message ControlComplianceSummary { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" + pattern: "projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" + pattern: "folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" + pattern: "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" + plural: "controlComplianceSummaries" + singular: "controlComplianceSummary" + }; + + // The name of the control. + string control = 1; + + // The display name of the control. + string display_name = 2; + + // The description of the control. + string description = 3; + + // Output only. The overall evaluation status of the control. + EvaluationState overall_evaluation_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The total number of findings for the control. + int32 total_findings_count = 5; + + // The list of compliance frameworks that the control belongs to. + repeated string compliance_frameworks = 6; + + // The list of similar controls. + repeated SimilarControls similar_controls = 7; + + // The list of cloud control reports. + repeated CloudControlReport cloud_control_reports = 8; + + // The responsibility type for the control. + RegulatoryControlResponsibilityType control_responsibility_type = 9; + + // Whether the control is a fake control. Fake controls are created + // and mapped to cloud controls that don't belong to a control group. + bool is_fake_control = 10; + + // Identifier. The name of the control compliance summary. + string name = 11 [(google.api.field_behavior) = IDENTIFIER]; +} + +// The cloud control report. +message CloudControlReport { + // The assessment details of the cloud control. + oneof assessment_details { + // The details of a manual cloud control assessment. + ManualCloudControlAssessmentDetails + manual_cloud_control_assessment_details = 13; + + // The details of a cloud control assessment. + CloudControlAssessmentDetails cloud_control_assessment_details = 14; + } + + // The name of the cloud control. + string cloud_control = 1; + + // The display name of the cloud control. + string display_name = 2; + + // The description of the cloud control. + string description = 3; + + // The list of categories for the cloud control. + repeated string categories = 6; + + // The list of similar controls. + repeated SimilarControls similar_controls = 9; + + // The type of the cloud control. + CloudControl.Type cloud_control_type = 10; + + // The category of the finding. + string finding_category = 11; + + // The list of rules that correspond to the cloud control. + repeated Rule rules = 12; + + // The severity of the finding. + Severity finding_severity = 15; + + // The enforcement mode of the cloud control. + EnforcementMode enforcement_mode = 16; + + // The name of the cloud control deployment. + string cloud_control_deployment = 17; + + // The major revision ID of the cloud control. + int64 major_revision_id = 18; + + // The minor revision ID of the cloud control. + int64 minor_revision_id = 19; + + // The major revision IDs of the frameworks that the cloud control belongs to. + repeated int64 framework_major_revision_ids = 20; +} + +// The details for a manual cloud control assessment. +message ManualCloudControlAssessmentDetails { + // The guide for assessing a cloud control manually. + repeated string manual_cloud_control_guide = 1; +} + +// The cloud control assessment details for non-manual cloud controls. +message CloudControlAssessmentDetails { + // The number of findings for the cloud control. + int32 findings_count = 1; + + // Output only. The evaluation status of the cloud control. + EvaluationState evaluation_state = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The similar controls. +message SimilarControls { + // The name of the framework. + string framework = 1; + + // The ID of the control. + string control_id = 2; +} + +// The aggregated compliance report. +message AggregatedComplianceReport { + // The control assessment details of the framework. + ControlAssessmentDetails control_assessment_details = 1; + + // The report time of the aggregated compliance report. + google.protobuf.Timestamp report_time = 2; +} + +// The details for a target resource. +message TargetResourceDetails { + // The framework deployment name for the target resource. + // + // For example, + // `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}` + string framework_deployment = 1; + + // The display name of the target resource. For example, `google.com`, + // `staging-project`, or `development-folder`. + string target_resource_display_name = 2; + + // The target resource. For example, `organizations/1234567890`, + // `projects/1234567890`, or `folders/1234567890`. + string target_resource = 3; + + // The create time of the target resource. + google.protobuf.Timestamp create_time = 4; + + // The update time of the target resource. + google.protobuf.Timestamp update_time = 5; + + // The major revision ID of the framework for the target resource. + int64 major_revision_id = 6; + + // The minor revision ID of the framework for the target resource. + int64 minor_revision_id = 7; +} + +// The trend of a compliance metric. +message Trend { + // Output only. The duration for the trend. + google.protobuf.Duration duration = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The trend value as a percentage. The value can be positive or + // negative. + double value_percent = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts new file mode 100644 index 00000000000..7d8d15d1f33 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts @@ -0,0 +1,19302 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace cloudsecuritycompliance. */ + namespace cloudsecuritycompliance { + + /** Namespace v1. */ + namespace v1 { + + /** Represents an Audit */ + class Audit extends $protobuf.rpc.Service { + + /** + * Constructs a new Audit 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 Audit 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): Audit; + + /** + * Calls GenerateFrameworkAuditScopeReport. + * @param request GenerateFrameworkAuditScopeReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateFrameworkAuditScopeReportResponse + */ + public generateFrameworkAuditScopeReport(request: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReportCallback): void; + + /** + * Calls GenerateFrameworkAuditScopeReport. + * @param request GenerateFrameworkAuditScopeReportRequest message or plain object + * @returns Promise + */ + public generateFrameworkAuditScopeReport(request: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest): Promise; + + /** + * Calls CreateFrameworkAudit. + * @param request CreateFrameworkAuditRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAuditCallback): void; + + /** + * Calls CreateFrameworkAudit. + * @param request CreateFrameworkAuditRequest message or plain object + * @returns Promise + */ + public createFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest): Promise; + + /** + * Calls ListFrameworkAudits. + * @param request ListFrameworkAuditsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworkAuditsResponse + */ + public listFrameworkAudits(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAuditsCallback): void; + + /** + * Calls ListFrameworkAudits. + * @param request ListFrameworkAuditsRequest message or plain object + * @returns Promise + */ + public listFrameworkAudits(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest): Promise; + + /** + * Calls GetFrameworkAudit. + * @param request GetFrameworkAuditRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FrameworkAudit + */ + public getFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAuditCallback): void; + + /** + * Calls GetFrameworkAudit. + * @param request GetFrameworkAuditRequest message or plain object + * @returns Promise + */ + public getFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest): Promise; + } + + namespace Audit { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|generateFrameworkAuditScopeReport}. + * @param error Error, if any + * @param [response] GenerateFrameworkAuditScopeReportResponse + */ + type GenerateFrameworkAuditScopeReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|createFrameworkAudit}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateFrameworkAuditCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|listFrameworkAudits}. + * @param error Error, if any + * @param [response] ListFrameworkAuditsResponse + */ + type ListFrameworkAuditsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|getFrameworkAudit}. + * @param error Error, if any + * @param [response] FrameworkAudit + */ + type GetFrameworkAuditCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) => void; + } + + /** ComplianceState enum. */ + enum ComplianceState { + COMPLIANCE_STATE_UNSPECIFIED = 0, + COMPLIANT = 1, + VIOLATION = 2, + MANUAL_REVIEW_NEEDED = 3, + ERROR = 4, + AUDIT_NOT_SUPPORTED = 5 + } + + /** Properties of a GenerateFrameworkAuditScopeReportRequest. */ + interface IGenerateFrameworkAuditScopeReportRequest { + + /** GenerateFrameworkAuditScopeReportRequest scope */ + scope?: (string|null); + + /** GenerateFrameworkAuditScopeReportRequest reportFormat */ + reportFormat?: (google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|null); + + /** GenerateFrameworkAuditScopeReportRequest complianceFramework */ + complianceFramework?: (string|null); + } + + /** Represents a GenerateFrameworkAuditScopeReportRequest. */ + class GenerateFrameworkAuditScopeReportRequest implements IGenerateFrameworkAuditScopeReportRequest { + + /** + * Constructs a new GenerateFrameworkAuditScopeReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest); + + /** GenerateFrameworkAuditScopeReportRequest scope. */ + public scope: string; + + /** GenerateFrameworkAuditScopeReportRequest reportFormat. */ + public reportFormat: (google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format); + + /** GenerateFrameworkAuditScopeReportRequest complianceFramework. */ + public complianceFramework: string; + + /** + * Creates a new GenerateFrameworkAuditScopeReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateFrameworkAuditScopeReportRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateFrameworkAuditScopeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; + + /** + * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateFrameworkAuditScopeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; + + /** + * Verifies a GenerateFrameworkAuditScopeReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateFrameworkAuditScopeReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateFrameworkAuditScopeReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; + + /** + * Creates a plain object from a GenerateFrameworkAuditScopeReportRequest message. Also converts values to other types if specified. + * @param message GenerateFrameworkAuditScopeReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateFrameworkAuditScopeReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateFrameworkAuditScopeReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GenerateFrameworkAuditScopeReportRequest { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + ODF = 1 + } + } + + /** Properties of a GenerateFrameworkAuditScopeReportResponse. */ + interface IGenerateFrameworkAuditScopeReportResponse { + + /** GenerateFrameworkAuditScopeReportResponse scopeReportContents */ + scopeReportContents?: (Uint8Array|Buffer|string|null); + + /** GenerateFrameworkAuditScopeReportResponse name */ + name?: (string|null); + + /** GenerateFrameworkAuditScopeReportResponse complianceFramework */ + complianceFramework?: (string|null); + } + + /** Represents a GenerateFrameworkAuditScopeReportResponse. */ + class GenerateFrameworkAuditScopeReportResponse implements IGenerateFrameworkAuditScopeReportResponse { + + /** + * Constructs a new GenerateFrameworkAuditScopeReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse); + + /** GenerateFrameworkAuditScopeReportResponse scopeReportContents. */ + public scopeReportContents?: (Uint8Array|Buffer|string|null); + + /** GenerateFrameworkAuditScopeReportResponse name. */ + public name: string; + + /** GenerateFrameworkAuditScopeReportResponse complianceFramework. */ + public complianceFramework: string; + + /** GenerateFrameworkAuditScopeReportResponse auditReport. */ + public auditReport?: "scopeReportContents"; + + /** + * Creates a new GenerateFrameworkAuditScopeReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateFrameworkAuditScopeReportResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. + * @param message GenerateFrameworkAuditScopeReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateFrameworkAuditScopeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; + + /** + * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateFrameworkAuditScopeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; + + /** + * Verifies a GenerateFrameworkAuditScopeReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateFrameworkAuditScopeReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateFrameworkAuditScopeReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; + + /** + * Creates a plain object from a GenerateFrameworkAuditScopeReportResponse message. Also converts values to other types if specified. + * @param message GenerateFrameworkAuditScopeReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateFrameworkAuditScopeReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateFrameworkAuditScopeReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportSummary. */ + interface IReportSummary { + + /** ReportSummary totalCount */ + totalCount?: (number|null); + + /** ReportSummary compliantCount */ + compliantCount?: (number|null); + + /** ReportSummary violationCount */ + violationCount?: (number|null); + + /** ReportSummary manualReviewNeededCount */ + manualReviewNeededCount?: (number|null); + + /** ReportSummary errorCount */ + errorCount?: (number|null); + } + + /** Represents a ReportSummary. */ + class ReportSummary implements IReportSummary { + + /** + * Constructs a new ReportSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IReportSummary); + + /** ReportSummary totalCount. */ + public totalCount: number; + + /** ReportSummary compliantCount. */ + public compliantCount: number; + + /** ReportSummary violationCount. */ + public violationCount: number; + + /** ReportSummary manualReviewNeededCount. */ + public manualReviewNeededCount: number; + + /** ReportSummary errorCount. */ + public errorCount: number; + + /** + * Creates a new ReportSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportSummary instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IReportSummary): google.cloud.cloudsecuritycompliance.v1.ReportSummary; + + /** + * Encodes the specified ReportSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. + * @param message ReportSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IReportSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. + * @param message ReportSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IReportSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ReportSummary; + + /** + * Decodes a ReportSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ReportSummary; + + /** + * Verifies a ReportSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ReportSummary; + + /** + * Creates a plain object from a ReportSummary message. Also converts values to other types if specified. + * @param message ReportSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ReportSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFrameworkAuditRequest. */ + interface ICreateFrameworkAuditRequest { + + /** CreateFrameworkAuditRequest parent */ + parent?: (string|null); + + /** CreateFrameworkAuditRequest frameworkAuditId */ + frameworkAuditId?: (string|null); + + /** CreateFrameworkAuditRequest frameworkAudit */ + frameworkAudit?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null); + } + + /** Represents a CreateFrameworkAuditRequest. */ + class CreateFrameworkAuditRequest implements ICreateFrameworkAuditRequest { + + /** + * Constructs a new CreateFrameworkAuditRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest); + + /** CreateFrameworkAuditRequest parent. */ + public parent: string; + + /** CreateFrameworkAuditRequest frameworkAuditId. */ + public frameworkAuditId: string; + + /** CreateFrameworkAuditRequest frameworkAudit. */ + public frameworkAudit?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null); + + /** + * Creates a new CreateFrameworkAuditRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFrameworkAuditRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; + + /** + * Encodes the specified CreateFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. + * @param message CreateFrameworkAuditRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. + * @param message CreateFrameworkAuditRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; + + /** + * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; + + /** + * Verifies a CreateFrameworkAuditRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFrameworkAuditRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; + + /** + * Creates a plain object from a CreateFrameworkAuditRequest message. Also converts values to other types if specified. + * @param message CreateFrameworkAuditRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFrameworkAuditRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFrameworkAuditRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FrameworkAuditDestination. */ + interface IFrameworkAuditDestination { + + /** FrameworkAuditDestination bucket */ + bucket?: (google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null); + } + + /** Represents a FrameworkAuditDestination. */ + class FrameworkAuditDestination implements IFrameworkAuditDestination { + + /** + * Constructs a new FrameworkAuditDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination); + + /** FrameworkAuditDestination bucket. */ + public bucket?: (google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null); + + /** FrameworkAuditDestination destinationType. */ + public destinationType?: "bucket"; + + /** + * Creates a new FrameworkAuditDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkAuditDestination instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; + + /** + * Encodes the specified FrameworkAuditDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. + * @param message FrameworkAuditDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkAuditDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. + * @param message FrameworkAuditDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkAuditDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkAuditDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; + + /** + * Decodes a FrameworkAuditDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkAuditDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; + + /** + * Verifies a FrameworkAuditDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FrameworkAuditDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkAuditDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; + + /** + * Creates a plain object from a FrameworkAuditDestination message. Also converts values to other types if specified. + * @param message FrameworkAuditDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkAuditDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkAuditDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BucketDestination. */ + interface IBucketDestination { + + /** BucketDestination bucketUri */ + bucketUri?: (string|null); + + /** BucketDestination frameworkAuditFormat */ + frameworkAuditFormat?: (google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|null); + } + + /** Represents a BucketDestination. */ + class BucketDestination implements IBucketDestination { + + /** + * Constructs a new BucketDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IBucketDestination); + + /** BucketDestination bucketUri. */ + public bucketUri: string; + + /** BucketDestination frameworkAuditFormat. */ + public frameworkAuditFormat: (google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format); + + /** + * Creates a new BucketDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketDestination instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IBucketDestination): google.cloud.cloudsecuritycompliance.v1.BucketDestination; + + /** + * Encodes the specified BucketDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. + * @param message BucketDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IBucketDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BucketDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. + * @param message BucketDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IBucketDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BucketDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.BucketDestination; + + /** + * Decodes a BucketDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.BucketDestination; + + /** + * Verifies a BucketDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BucketDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.BucketDestination; + + /** + * Creates a plain object from a BucketDestination message. Also converts values to other types if specified. + * @param message BucketDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.BucketDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BucketDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BucketDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BucketDestination { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + ODF = 1 + } + } + + /** Properties of a FrameworkAudit. */ + interface IFrameworkAudit { + + /** FrameworkAudit name */ + name?: (string|null); + + /** FrameworkAudit frameworkAuditId */ + frameworkAuditId?: (string|null); + + /** FrameworkAudit complianceFramework */ + complianceFramework?: (string|null); + + /** FrameworkAudit scope */ + scope?: (string|null); + + /** FrameworkAudit frameworkAuditDestination */ + frameworkAuditDestination?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null); + + /** FrameworkAudit startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkAudit finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkAudit complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); + + /** FrameworkAudit reportSummary */ + reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + + /** FrameworkAudit cloudControlGroupAuditDetails */ + cloudControlGroupAuditDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails[]|null); + + /** FrameworkAudit cloudControlAuditDetails */ + cloudControlAuditDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]|null); + + /** FrameworkAudit operationId */ + operationId?: (string|null); + + /** FrameworkAudit state */ + state?: (google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|null); + } + + /** Represents a FrameworkAudit. */ + class FrameworkAudit implements IFrameworkAudit { + + /** + * Constructs a new FrameworkAudit. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit); + + /** FrameworkAudit name. */ + public name: string; + + /** FrameworkAudit frameworkAuditId. */ + public frameworkAuditId: string; + + /** FrameworkAudit complianceFramework. */ + public complianceFramework: string; + + /** FrameworkAudit scope. */ + public scope: string; + + /** FrameworkAudit frameworkAuditDestination. */ + public frameworkAuditDestination?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null); + + /** FrameworkAudit startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkAudit finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkAudit complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); + + /** FrameworkAudit reportSummary. */ + public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + + /** FrameworkAudit cloudControlGroupAuditDetails. */ + public cloudControlGroupAuditDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails[]; + + /** FrameworkAudit cloudControlAuditDetails. */ + public cloudControlAuditDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]; + + /** FrameworkAudit operationId. */ + public operationId: string; + + /** FrameworkAudit state. */ + public state: (google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State); + + /** + * Creates a new FrameworkAudit instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkAudit instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; + + /** + * Encodes the specified FrameworkAudit message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. + * @param message FrameworkAudit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkAudit message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. + * @param message FrameworkAudit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkAudit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkAudit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; + + /** + * Decodes a FrameworkAudit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkAudit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; + + /** + * Verifies a FrameworkAudit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FrameworkAudit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkAudit + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; + + /** + * Creates a plain object from a FrameworkAudit message. Also converts values to other types if specified. + * @param message FrameworkAudit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkAudit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkAudit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkAudit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FrameworkAudit { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SCHEDULED = 1, + RUNNING = 2, + UPLOADING = 3, + FAILED = 4, + SUCCEEDED = 5 + } + } + + /** Properties of a ListFrameworkAuditsRequest. */ + interface IListFrameworkAuditsRequest { + + /** ListFrameworkAuditsRequest parent */ + parent?: (string|null); + + /** ListFrameworkAuditsRequest pageSize */ + pageSize?: (number|null); + + /** ListFrameworkAuditsRequest pageToken */ + pageToken?: (string|null); + + /** ListFrameworkAuditsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListFrameworkAuditsRequest. */ + class ListFrameworkAuditsRequest implements IListFrameworkAuditsRequest { + + /** + * Constructs a new ListFrameworkAuditsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest); + + /** ListFrameworkAuditsRequest parent. */ + public parent: string; + + /** ListFrameworkAuditsRequest pageSize. */ + public pageSize: number; + + /** ListFrameworkAuditsRequest pageToken. */ + public pageToken: string; + + /** ListFrameworkAuditsRequest filter. */ + public filter: string; + + /** + * Creates a new ListFrameworkAuditsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworkAuditsRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; + + /** + * Encodes the specified ListFrameworkAuditsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. + * @param message ListFrameworkAuditsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworkAuditsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. + * @param message ListFrameworkAuditsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworkAuditsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; + + /** + * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworkAuditsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; + + /** + * Verifies a ListFrameworkAuditsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworkAuditsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworkAuditsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; + + /** + * Creates a plain object from a ListFrameworkAuditsRequest message. Also converts values to other types if specified. + * @param message ListFrameworkAuditsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworkAuditsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworkAuditsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFrameworkAuditsResponse. */ + interface IListFrameworkAuditsResponse { + + /** ListFrameworkAuditsResponse frameworkAudits */ + frameworkAudits?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]|null); + + /** ListFrameworkAuditsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFrameworkAuditsResponse. */ + class ListFrameworkAuditsResponse implements IListFrameworkAuditsResponse { + + /** + * Constructs a new ListFrameworkAuditsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse); + + /** ListFrameworkAuditsResponse frameworkAudits. */ + public frameworkAudits: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]; + + /** ListFrameworkAuditsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFrameworkAuditsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworkAuditsResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; + + /** + * Encodes the specified ListFrameworkAuditsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. + * @param message ListFrameworkAuditsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworkAuditsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. + * @param message ListFrameworkAuditsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworkAuditsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; + + /** + * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworkAuditsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; + + /** + * Verifies a ListFrameworkAuditsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworkAuditsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworkAuditsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; + + /** + * Creates a plain object from a ListFrameworkAuditsResponse message. Also converts values to other types if specified. + * @param message ListFrameworkAuditsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworkAuditsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworkAuditsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFrameworkAuditRequest. */ + interface IGetFrameworkAuditRequest { + + /** GetFrameworkAuditRequest name */ + name?: (string|null); + } + + /** Represents a GetFrameworkAuditRequest. */ + class GetFrameworkAuditRequest implements IGetFrameworkAuditRequest { + + /** + * Constructs a new GetFrameworkAuditRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest); + + /** GetFrameworkAuditRequest name. */ + public name: string; + + /** + * Creates a new GetFrameworkAuditRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFrameworkAuditRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; + + /** + * Encodes the specified GetFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. + * @param message GetFrameworkAuditRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. + * @param message GetFrameworkAuditRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; + + /** + * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; + + /** + * Verifies a GetFrameworkAuditRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFrameworkAuditRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; + + /** + * Creates a plain object from a GetFrameworkAuditRequest message. Also converts values to other types if specified. + * @param message GetFrameworkAuditRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFrameworkAuditRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFrameworkAuditRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlGroupAuditDetails. */ + interface ICloudControlGroupAuditDetails { + + /** CloudControlGroupAuditDetails cloudControlGroupId */ + cloudControlGroupId?: (string|null); + + /** CloudControlGroupAuditDetails displayName */ + displayName?: (string|null); + + /** CloudControlGroupAuditDetails description */ + description?: (string|null); + + /** CloudControlGroupAuditDetails responsibilityType */ + responsibilityType?: (string|null); + + /** CloudControlGroupAuditDetails googleResponsibilityDescription */ + googleResponsibilityDescription?: (string|null); + + /** CloudControlGroupAuditDetails googleResponsibilityImplementation */ + googleResponsibilityImplementation?: (string|null); + + /** CloudControlGroupAuditDetails customerResponsibilityDescription */ + customerResponsibilityDescription?: (string|null); + + /** CloudControlGroupAuditDetails customerResponsibilityImplementation */ + customerResponsibilityImplementation?: (string|null); + + /** CloudControlGroupAuditDetails complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); + + /** CloudControlGroupAuditDetails controlId */ + controlId?: (string|null); + + /** CloudControlGroupAuditDetails controlFamily */ + controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** CloudControlGroupAuditDetails cloudControlDetails */ + cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]|null); + + /** CloudControlGroupAuditDetails reportSummary */ + reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + } + + /** Represents a CloudControlGroupAuditDetails. */ + class CloudControlGroupAuditDetails implements ICloudControlGroupAuditDetails { + + /** + * Constructs a new CloudControlGroupAuditDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails); + + /** CloudControlGroupAuditDetails cloudControlGroupId. */ + public cloudControlGroupId: string; + + /** CloudControlGroupAuditDetails displayName. */ + public displayName: string; + + /** CloudControlGroupAuditDetails description. */ + public description: string; + + /** CloudControlGroupAuditDetails responsibilityType. */ + public responsibilityType: string; + + /** CloudControlGroupAuditDetails googleResponsibilityDescription. */ + public googleResponsibilityDescription: string; + + /** CloudControlGroupAuditDetails googleResponsibilityImplementation. */ + public googleResponsibilityImplementation: string; + + /** CloudControlGroupAuditDetails customerResponsibilityDescription. */ + public customerResponsibilityDescription: string; + + /** CloudControlGroupAuditDetails customerResponsibilityImplementation. */ + public customerResponsibilityImplementation: string; + + /** CloudControlGroupAuditDetails complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); + + /** CloudControlGroupAuditDetails controlId. */ + public controlId: string; + + /** CloudControlGroupAuditDetails controlFamily. */ + public controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** CloudControlGroupAuditDetails cloudControlDetails. */ + public cloudControlDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]; + + /** CloudControlGroupAuditDetails reportSummary. */ + public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + + /** + * Creates a new CloudControlGroupAuditDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlGroupAuditDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; + + /** + * Encodes the specified CloudControlGroupAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. + * @param message CloudControlGroupAuditDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlGroupAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. + * @param message CloudControlGroupAuditDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlGroupAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; + + /** + * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlGroupAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; + + /** + * Verifies a CloudControlGroupAuditDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlGroupAuditDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlGroupAuditDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; + + /** + * Creates a plain object from a CloudControlGroupAuditDetails message. Also converts values to other types if specified. + * @param message CloudControlGroupAuditDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlGroupAuditDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlGroupAuditDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FindingDetails. */ + interface IFindingDetails { + + /** FindingDetails name */ + name?: (string|null); + + /** FindingDetails complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); + + /** FindingDetails observation */ + observation?: (google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null); + + /** FindingDetails evidence */ + evidence?: (google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null); + } + + /** Represents a FindingDetails. */ + class FindingDetails implements IFindingDetails { + + /** + * Constructs a new FindingDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingDetails); + + /** FindingDetails name. */ + public name: string; + + /** FindingDetails complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); + + /** FindingDetails observation. */ + public observation?: (google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null); + + /** FindingDetails evidence. */ + public evidence?: (google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null); + + /** + * Creates a new FindingDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns FindingDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingDetails): google.cloud.cloudsecuritycompliance.v1.FindingDetails; + + /** + * Encodes the specified FindingDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. + * @param message FindingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FindingDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. + * @param message FindingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FindingDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FindingDetails; + + /** + * Decodes a FindingDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FindingDetails; + + /** + * Verifies a FindingDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FindingDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FindingDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FindingDetails; + + /** + * Creates a plain object from a FindingDetails message. Also converts values to other types if specified. + * @param message FindingDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FindingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FindingDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FindingDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ObservationDetails. */ + interface IObservationDetails { + + /** ObservationDetails currentValue */ + currentValue?: (string|null); + + /** ObservationDetails expectedValue */ + expectedValue?: (string|null); + + /** ObservationDetails guidance */ + guidance?: (string|null); + } + + /** Represents an ObservationDetails. */ + class ObservationDetails implements IObservationDetails { + + /** + * Constructs a new ObservationDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IObservationDetails); + + /** ObservationDetails currentValue. */ + public currentValue: string; + + /** ObservationDetails expectedValue. */ + public expectedValue: string; + + /** ObservationDetails guidance. */ + public guidance: string; + + /** + * Creates a new ObservationDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ObservationDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IObservationDetails): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; + + /** + * Encodes the specified ObservationDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. + * @param message ObservationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IObservationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ObservationDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. + * @param message ObservationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IObservationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ObservationDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ObservationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; + + /** + * Decodes an ObservationDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ObservationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; + + /** + * Verifies an ObservationDetails message. + * @param message Plain 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 ObservationDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ObservationDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; + + /** + * Creates a plain object from an ObservationDetails message. Also converts values to other types if specified. + * @param message ObservationDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ObservationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ObservationDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ObservationDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EvidenceDetails. */ + interface IEvidenceDetails { + + /** EvidenceDetails resource */ + resource?: (string|null); + + /** EvidenceDetails service */ + service?: (string|null); + + /** EvidenceDetails evidencePath */ + evidencePath?: (string|null); + } + + /** Represents an EvidenceDetails. */ + class EvidenceDetails implements IEvidenceDetails { + + /** + * Constructs a new EvidenceDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails); + + /** EvidenceDetails resource. */ + public resource: string; + + /** EvidenceDetails service. */ + public service: string; + + /** EvidenceDetails evidencePath. */ + public evidencePath: string; + + /** + * Creates a new EvidenceDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns EvidenceDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; + + /** + * Encodes the specified EvidenceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. + * @param message EvidenceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvidenceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. + * @param message EvidenceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvidenceDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvidenceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; + + /** + * Decodes an EvidenceDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvidenceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; + + /** + * Verifies an EvidenceDetails message. + * @param message Plain 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 EvidenceDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvidenceDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; + + /** + * Creates a plain object from an EvidenceDetails message. Also converts values to other types if specified. + * @param message EvidenceDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.EvidenceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvidenceDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvidenceDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlAuditDetails. */ + interface ICloudControlAuditDetails { + + /** CloudControlAuditDetails cloudControl */ + cloudControl?: (string|null); + + /** CloudControlAuditDetails cloudControlId */ + cloudControlId?: (string|null); + + /** CloudControlAuditDetails cloudControlDescription */ + cloudControlDescription?: (string|null); + + /** CloudControlAuditDetails complianceState */ + complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); + + /** CloudControlAuditDetails reportSummary */ + reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + + /** CloudControlAuditDetails findings */ + findings?: (google.cloud.cloudsecuritycompliance.v1.IFindingDetails[]|null); + } + + /** Represents a CloudControlAuditDetails. */ + class CloudControlAuditDetails implements ICloudControlAuditDetails { + + /** + * Constructs a new CloudControlAuditDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails); + + /** CloudControlAuditDetails cloudControl. */ + public cloudControl: string; + + /** CloudControlAuditDetails cloudControlId. */ + public cloudControlId: string; + + /** CloudControlAuditDetails cloudControlDescription. */ + public cloudControlDescription: string; + + /** CloudControlAuditDetails complianceState. */ + public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); + + /** CloudControlAuditDetails reportSummary. */ + public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); + + /** CloudControlAuditDetails findings. */ + public findings: google.cloud.cloudsecuritycompliance.v1.IFindingDetails[]; + + /** + * Creates a new CloudControlAuditDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlAuditDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; + + /** + * Encodes the specified CloudControlAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. + * @param message CloudControlAuditDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. + * @param message CloudControlAuditDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlAuditDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; + + /** + * Decodes a CloudControlAuditDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; + + /** + * Verifies a CloudControlAuditDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlAuditDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlAuditDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; + + /** + * Creates a plain object from a CloudControlAuditDetails message. Also converts values to other types if specified. + * @param message CloudControlAuditDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlAuditDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlAuditDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RegulatoryControlResponsibilityType enum. */ + enum RegulatoryControlResponsibilityType { + REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0, + GOOGLE = 1, + CUSTOMER = 2, + SHARED = 3 + } + + /** EnforcementMode enum. */ + enum EnforcementMode { + ENFORCEMENT_MODE_UNSPECIFIED = 0, + PREVENTIVE = 1, + DETECTIVE = 2, + AUDIT = 3 + } + + /** FrameworkCategory enum. */ + enum FrameworkCategory { + FRAMEWORK_CATEGORY_UNSPECIFIED = 0, + INDUSTRY_DEFINED_STANDARD = 1, + ASSURED_WORKLOADS = 2, + DATA_SECURITY = 3, + GOOGLE_BEST_PRACTICES = 4, + CUSTOM_FRAMEWORK = 5 + } + + /** CloudControlCategory enum. */ + enum CloudControlCategory { + CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0, + CC_CATEGORY_INFRASTRUCTURE = 1, + CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2, + CC_CATEGORY_PHYSICAL_SECURITY = 3, + CC_CATEGORY_DATA_SECURITY = 4, + CC_CATEGORY_NETWORK_SECURITY = 5, + CC_CATEGORY_INCIDENT_MANAGEMENT = 6, + CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7, + CC_CATEGORY_ENCRYPTION = 8, + CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9, + CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10, + CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11, + CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12, + CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13, + CC_CATEGORY_PRIVACY = 14, + CC_CATEGORY_BCDR = 15, + CC_CATEGORY_ADMIN_ACCESS = 16, + CC_CATEGORY_DATA_RESIDENCY = 17, + CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18, + CC_CATEGORY_SERVICE_SPECIFIC = 19 + } + + /** CloudProvider enum. */ + enum CloudProvider { + CLOUD_PROVIDER_UNSPECIFIED = 0, + AWS = 1, + AZURE = 2, + GCP = 3 + } + + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + CRITICAL = 1, + HIGH = 2, + MEDIUM = 3, + LOW = 4 + } + + /** RuleActionType enum. */ + enum RuleActionType { + RULE_ACTION_TYPE_UNSPECIFIED = 0, + RULE_ACTION_TYPE_PREVENTIVE = 1, + RULE_ACTION_TYPE_DETECTIVE = 2, + RULE_ACTION_TYPE_AUDIT = 3 + } + + /** TargetResourceType enum. */ + enum TargetResourceType { + TARGET_RESOURCE_TYPE_UNSPECIFIED = 0, + TARGET_RESOURCE_CRM_TYPE_ORG = 1, + TARGET_RESOURCE_CRM_TYPE_FOLDER = 2, + TARGET_RESOURCE_CRM_TYPE_PROJECT = 3, + TARGET_RESOURCE_TYPE_APPLICATION = 4 + } + + /** Properties of a Framework. */ + interface IFramework { + + /** Framework name */ + name?: (string|null); + + /** Framework majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** Framework displayName */ + displayName?: (string|null); + + /** Framework description */ + description?: (string|null); + + /** Framework type */ + type?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); + + /** Framework cloudControlDetails */ + cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]|null); + + /** Framework category */ + category?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); + + /** Framework supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + + /** Framework supportedTargetResourceTypes */ + supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); + + /** Framework supportedEnforcementModes */ + supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); + } + + /** Represents a Framework. */ + class Framework implements IFramework { + + /** + * Constructs a new Framework. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework); + + /** Framework name. */ + public name: string; + + /** Framework majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** Framework displayName. */ + public displayName: string; + + /** Framework description. */ + public description: string; + + /** Framework type. */ + public type: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); + + /** Framework cloudControlDetails. */ + public cloudControlDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]; + + /** Framework category. */ + public category: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; + + /** Framework supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** Framework supportedTargetResourceTypes. */ + public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; + + /** Framework supportedEnforcementModes. */ + public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; + + /** + * Creates a new Framework instance using the specified properties. + * @param [properties] Properties to set + * @returns Framework instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework): google.cloud.cloudsecuritycompliance.v1.Framework; + + /** + * Encodes the specified Framework message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. + * @param message Framework message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Framework message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. + * @param message Framework message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Framework message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Framework + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Framework; + + /** + * Decodes a Framework message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Framework + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Framework; + + /** + * Verifies a Framework message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Framework message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Framework + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Framework; + + /** + * Creates a plain object from a Framework message. Also converts values to other types if specified. + * @param message Framework + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Framework, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Framework to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Framework + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Framework { + + /** FrameworkType enum. */ + enum FrameworkType { + FRAMEWORK_TYPE_UNSPECIFIED = 0, + BUILT_IN = 1, + CUSTOM = 2 + } + } + + /** Properties of a CloudControlDetails. */ + interface ICloudControlDetails { + + /** CloudControlDetails name */ + name?: (string|null); + + /** CloudControlDetails majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** CloudControlDetails parameters */ + parameters?: (google.cloud.cloudsecuritycompliance.v1.IParameter[]|null); + } + + /** Represents a CloudControlDetails. */ + class CloudControlDetails implements ICloudControlDetails { + + /** + * Constructs a new CloudControlDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails); + + /** CloudControlDetails name. */ + public name: string; + + /** CloudControlDetails majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** CloudControlDetails parameters. */ + public parameters: google.cloud.cloudsecuritycompliance.v1.IParameter[]; + + /** + * Creates a new CloudControlDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; + + /** + * Encodes the specified CloudControlDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. + * @param message CloudControlDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. + * @param message CloudControlDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; + + /** + * Decodes a CloudControlDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; + + /** + * Verifies a CloudControlDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; + + /** + * Creates a plain object from a CloudControlDetails message. Also converts values to other types if specified. + * @param message CloudControlDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FrameworkReference. */ + interface IFrameworkReference { + + /** FrameworkReference framework */ + framework?: (string|null); + + /** FrameworkReference majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + } + + /** Represents a FrameworkReference. */ + class FrameworkReference implements IFrameworkReference { + + /** + * Constructs a new FrameworkReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference); + + /** FrameworkReference framework. */ + public framework: string; + + /** FrameworkReference majorRevisionId. */ + public majorRevisionId?: (number|Long|string|null); + + /** + * Creates a new FrameworkReference instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkReference instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; + + /** + * Encodes the specified FrameworkReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. + * @param message FrameworkReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. + * @param message FrameworkReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; + + /** + * Decodes a FrameworkReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; + + /** + * Verifies a FrameworkReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FrameworkReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; + + /** + * Creates a plain object from a FrameworkReference message. Also converts values to other types if specified. + * @param message FrameworkReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Parameter. */ + interface IParameter { + + /** Parameter name */ + name?: (string|null); + + /** Parameter parameterValue */ + parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + } + + /** Represents a Parameter. */ + class Parameter implements IParameter { + + /** + * Constructs a new Parameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter); + + /** Parameter name. */ + public name: string; + + /** Parameter parameterValue. */ + public parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + + /** + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter): google.cloud.cloudsecuritycompliance.v1.Parameter; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Parameter; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Parameter; + + /** + * Verifies a Parameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Parameter; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Parameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Parameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControl. */ + interface ICloudControl { + + /** CloudControl name */ + name?: (string|null); + + /** CloudControl majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** CloudControl description */ + description?: (string|null); + + /** CloudControl displayName */ + displayName?: (string|null); + + /** CloudControl supportedEnforcementModes */ + supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); + + /** CloudControl parameterSpec */ + parameterSpec?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); + + /** CloudControl rules */ + rules?: (google.cloud.cloudsecuritycompliance.v1.IRule[]|null); + + /** CloudControl severity */ + severity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); + + /** CloudControl findingCategory */ + findingCategory?: (string|null); + + /** CloudControl supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + + /** CloudControl relatedFrameworks */ + relatedFrameworks?: (string[]|null); + + /** CloudControl remediationSteps */ + remediationSteps?: (string|null); + + /** CloudControl categories */ + categories?: (google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]|null); + + /** CloudControl createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControl supportedTargetResourceTypes */ + supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); + } + + /** Represents a CloudControl. */ + class CloudControl implements ICloudControl { + + /** + * Constructs a new CloudControl. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl); + + /** CloudControl name. */ + public name: string; + + /** CloudControl majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** CloudControl description. */ + public description: string; + + /** CloudControl displayName. */ + public displayName: string; + + /** CloudControl supportedEnforcementModes. */ + public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; + + /** CloudControl parameterSpec. */ + public parameterSpec: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; + + /** CloudControl rules. */ + public rules: google.cloud.cloudsecuritycompliance.v1.IRule[]; + + /** CloudControl severity. */ + public severity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); + + /** CloudControl findingCategory. */ + public findingCategory: string; + + /** CloudControl supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** CloudControl relatedFrameworks. */ + public relatedFrameworks: string[]; + + /** CloudControl remediationSteps. */ + public remediationSteps: string; + + /** CloudControl categories. */ + public categories: google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]; + + /** CloudControl createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControl supportedTargetResourceTypes. */ + public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; + + /** + * Creates a new CloudControl instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControl instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl): google.cloud.cloudsecuritycompliance.v1.CloudControl; + + /** + * Encodes the specified CloudControl message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. + * @param message CloudControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControl message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. + * @param message CloudControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControl message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControl; + + /** + * Decodes a CloudControl message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControl; + + /** + * Verifies a CloudControl message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControl message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControl + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControl; + + /** + * Creates a plain object from a CloudControl message. Also converts values to other types if specified. + * @param message CloudControl + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControl to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControl + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudControl { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CUSTOM = 1, + BUILT_IN = 2 + } + } + + /** Properties of a ParameterSpec. */ + interface IParameterSpec { + + /** ParameterSpec name */ + name?: (string|null); + + /** ParameterSpec displayName */ + displayName?: (string|null); + + /** ParameterSpec description */ + description?: (string|null); + + /** ParameterSpec isRequired */ + isRequired?: (boolean|null); + + /** ParameterSpec valueType */ + valueType?: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|null); + + /** ParameterSpec defaultValue */ + defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + + /** ParameterSpec substitutionRules */ + substitutionRules?: (google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]|null); + + /** ParameterSpec subParameters */ + subParameters?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); + + /** ParameterSpec validation */ + validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); + } + + /** Represents a ParameterSpec. */ + class ParameterSpec implements IParameterSpec { + + /** + * Constructs a new ParameterSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec); + + /** ParameterSpec name. */ + public name: string; + + /** ParameterSpec displayName. */ + public displayName: string; + + /** ParameterSpec description. */ + public description: string; + + /** ParameterSpec isRequired. */ + public isRequired: boolean; + + /** ParameterSpec valueType. */ + public valueType: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType); + + /** ParameterSpec defaultValue. */ + public defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); + + /** ParameterSpec substitutionRules. */ + public substitutionRules: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]; + + /** ParameterSpec subParameters. */ + public subParameters: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; + + /** ParameterSpec validation. */ + public validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); + + /** + * Creates a new ParameterSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ParameterSpec instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Encodes the specified ParameterSpec message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. + * @param message ParameterSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParameterSpec message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. + * @param message ParameterSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParameterSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParameterSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Decodes a ParameterSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParameterSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Verifies a ParameterSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParameterSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParameterSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; + + /** + * Creates a plain object from a ParameterSpec message. Also converts values to other types if specified. + * @param message ParameterSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParameterSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParameterSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ParameterSpec { + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + STRING = 3, + BOOLEAN = 4, + STRINGLIST = 5, + NUMBER = 6, + ONEOF = 7 + } + } + + /** Properties of a Validation. */ + interface IValidation { + + /** Validation allowedValues */ + allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); + + /** Validation intRange */ + intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); + + /** Validation regexpPattern */ + regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); + } + + /** Represents a Validation. */ + class Validation implements IValidation { + + /** + * Constructs a new Validation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation); + + /** Validation allowedValues. */ + public allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); + + /** Validation intRange. */ + public intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); + + /** Validation regexpPattern. */ + public regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); + + /** Validation constraint. */ + public constraint?: ("allowedValues"|"intRange"|"regexpPattern"); + + /** + * Creates a new Validation instance using the specified properties. + * @param [properties] Properties to set + * @returns Validation instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation): google.cloud.cloudsecuritycompliance.v1.Validation; + + /** + * Encodes the specified Validation message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Validation; + + /** + * Decodes a Validation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Validation; + + /** + * Verifies a Validation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Validation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Validation; + + /** + * Creates a plain object from a Validation message. Also converts values to other types if specified. + * @param message Validation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Validation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Validation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllowedValues. */ + interface IAllowedValues { + + /** AllowedValues values */ + values?: (google.cloud.cloudsecuritycompliance.v1.IParamValue[]|null); + } + + /** Represents an AllowedValues. */ + class AllowedValues implements IAllowedValues { + + /** + * Constructs a new AllowedValues. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues); + + /** AllowedValues values. */ + public values: google.cloud.cloudsecuritycompliance.v1.IParamValue[]; + + /** + * Creates a new AllowedValues instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedValues instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Encodes the specified AllowedValues message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. + * @param message AllowedValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedValues message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. + * @param message AllowedValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedValues message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Decodes an AllowedValues message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Verifies an AllowedValues message. + * @param message Plain 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 AllowedValues message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedValues + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AllowedValues; + + /** + * Creates a plain object from an AllowedValues message. Also converts values to other types if specified. + * @param message AllowedValues + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AllowedValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedValues to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedValues + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegexpPattern. */ + interface IRegexpPattern { + + /** RegexpPattern pattern */ + pattern?: (string|null); + } + + /** Represents a RegexpPattern. */ + class RegexpPattern implements IRegexpPattern { + + /** + * Constructs a new RegexpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern); + + /** RegexpPattern pattern. */ + public pattern: string; + + /** + * Creates a new RegexpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns RegexpPattern instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Encodes the specified RegexpPattern message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. + * @param message RegexpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegexpPattern message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. + * @param message RegexpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegexpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegexpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Decodes a RegexpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegexpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Verifies a RegexpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegexpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegexpPattern + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; + + /** + * Creates a plain object from a RegexpPattern message. Also converts values to other types if specified. + * @param message RegexpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.RegexpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegexpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegexpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IntRange. */ + interface IIntRange { + + /** IntRange min */ + min?: (number|Long|string|null); + + /** IntRange max */ + max?: (number|Long|string|null); + } + + /** Represents an IntRange. */ + class IntRange implements IIntRange { + + /** + * Constructs a new IntRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange); + + /** IntRange min. */ + public min: (number|Long|string); + + /** IntRange max. */ + public max: (number|Long|string); + + /** + * Creates a new IntRange instance using the specified properties. + * @param [properties] Properties to set + * @returns IntRange instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange): google.cloud.cloudsecuritycompliance.v1.IntRange; + + /** + * Encodes the specified IntRange message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. + * @param message IntRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntRange message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. + * @param message IntRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.IntRange; + + /** + * Decodes an IntRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.IntRange; + + /** + * Verifies an IntRange message. + * @param message Plain 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 IntRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.IntRange; + + /** + * Creates a plain object from an IntRange message. Also converts values to other types if specified. + * @param message IntRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.IntRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringList. */ + interface IStringList { + + /** StringList values */ + values?: (string[]|null); + } + + /** Represents a StringList. */ + class StringList implements IStringList { + + /** + * Constructs a new StringList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList); + + /** StringList values. */ + public values: string[]; + + /** + * Creates a new StringList instance using the specified properties. + * @param [properties] Properties to set + * @returns StringList instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList): google.cloud.cloudsecuritycompliance.v1.StringList; + + /** + * Encodes the specified StringList message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. + * @param message StringList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. + * @param message StringList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.StringList; + + /** + * Decodes a StringList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.StringList; + + /** + * Verifies a StringList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringList + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.StringList; + + /** + * Creates a plain object from a StringList message. Also converts values to other types if specified. + * @param message StringList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.StringList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParamValue. */ + interface IParamValue { + + /** ParamValue stringValue */ + stringValue?: (string|null); + + /** ParamValue boolValue */ + boolValue?: (boolean|null); + + /** ParamValue stringListValue */ + stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** ParamValue numberValue */ + numberValue?: (number|null); + + /** ParamValue oneofValue */ + oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); + } + + /** Represents a ParamValue. */ + class ParamValue implements IParamValue { + + /** + * Constructs a new ParamValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue); + + /** ParamValue stringValue. */ + public stringValue?: (string|null); + + /** ParamValue boolValue. */ + public boolValue?: (boolean|null); + + /** ParamValue stringListValue. */ + public stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** ParamValue numberValue. */ + public numberValue?: (number|null); + + /** ParamValue oneofValue. */ + public oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); + + /** ParamValue kind. */ + public kind?: ("stringValue"|"boolValue"|"stringListValue"|"numberValue"|"oneofValue"); + + /** + * Creates a new ParamValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ParamValue instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue): google.cloud.cloudsecuritycompliance.v1.ParamValue; + + /** + * Encodes the specified ParamValue message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. + * @param message ParamValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParamValue message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. + * @param message ParamValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParamValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParamValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ParamValue; + + /** + * Decodes a ParamValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParamValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ParamValue; + + /** + * Verifies a ParamValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParamValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParamValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParamValue; + + /** + * Creates a plain object from a ParamValue message. Also converts values to other types if specified. + * @param message ParamValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParamValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParamValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParamValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParameterSubstitutionRule. */ + interface IParameterSubstitutionRule { + + /** ParameterSubstitutionRule placeholderSubstitutionRule */ + placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); + + /** ParameterSubstitutionRule attributeSubstitutionRule */ + attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); + } + + /** Represents a ParameterSubstitutionRule. */ + class ParameterSubstitutionRule implements IParameterSubstitutionRule { + + /** + * Constructs a new ParameterSubstitutionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule); + + /** ParameterSubstitutionRule placeholderSubstitutionRule. */ + public placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); + + /** ParameterSubstitutionRule attributeSubstitutionRule. */ + public attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); + + /** ParameterSubstitutionRule substitutionType. */ + public substitutionType?: ("placeholderSubstitutionRule"|"attributeSubstitutionRule"); + + /** + * Creates a new ParameterSubstitutionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns ParameterSubstitutionRule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Encodes the specified ParameterSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. + * @param message ParameterSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParameterSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. + * @param message ParameterSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParameterSubstitutionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParameterSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Decodes a ParameterSubstitutionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParameterSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Verifies a ParameterSubstitutionRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParameterSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParameterSubstitutionRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; + + /** + * Creates a plain object from a ParameterSubstitutionRule message. Also converts values to other types if specified. + * @param message ParameterSubstitutionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParameterSubstitutionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParameterSubstitutionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AttributeSubstitutionRule. */ + interface IAttributeSubstitutionRule { + + /** AttributeSubstitutionRule attribute */ + attribute?: (string|null); + } + + /** Represents an AttributeSubstitutionRule. */ + class AttributeSubstitutionRule implements IAttributeSubstitutionRule { + + /** + * Constructs a new AttributeSubstitutionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule); + + /** AttributeSubstitutionRule attribute. */ + public attribute: string; + + /** + * Creates a new AttributeSubstitutionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns AttributeSubstitutionRule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Encodes the specified AttributeSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. + * @param message AttributeSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttributeSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. + * @param message AttributeSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttributeSubstitutionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttributeSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Decodes an AttributeSubstitutionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttributeSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Verifies an AttributeSubstitutionRule message. + * @param message Plain 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 AttributeSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttributeSubstitutionRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; + + /** + * Creates a plain object from an AttributeSubstitutionRule message. Also converts values to other types if specified. + * @param message AttributeSubstitutionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttributeSubstitutionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttributeSubstitutionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaceholderSubstitutionRule. */ + interface IPlaceholderSubstitutionRule { + + /** PlaceholderSubstitutionRule attribute */ + attribute?: (string|null); + } + + /** Represents a PlaceholderSubstitutionRule. */ + class PlaceholderSubstitutionRule implements IPlaceholderSubstitutionRule { + + /** + * Constructs a new PlaceholderSubstitutionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule); + + /** PlaceholderSubstitutionRule attribute. */ + public attribute: string; + + /** + * Creates a new PlaceholderSubstitutionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceholderSubstitutionRule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Encodes the specified PlaceholderSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. + * @param message PlaceholderSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceholderSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. + * @param message PlaceholderSubstitutionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceholderSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceholderSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Verifies a PlaceholderSubstitutionRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceholderSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceholderSubstitutionRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; + + /** + * Creates a plain object from a PlaceholderSubstitutionRule message. Also converts values to other types if specified. + * @param message PlaceholderSubstitutionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceholderSubstitutionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceholderSubstitutionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Rule. */ + interface IRule { + + /** Rule celExpression */ + celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); + + /** Rule description */ + description?: (string|null); + + /** Rule ruleActionTypes */ + ruleActionTypes?: (google.cloud.cloudsecuritycompliance.v1.RuleActionType[]|null); + } + + /** Represents a Rule. */ + class Rule implements IRule { + + /** + * Constructs a new Rule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRule); + + /** Rule celExpression. */ + public celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); + + /** Rule description. */ + public description: string; + + /** Rule ruleActionTypes. */ + public ruleActionTypes: google.cloud.cloudsecuritycompliance.v1.RuleActionType[]; + + /** Rule implementation. */ + public implementation?: "celExpression"; + + /** + * Creates a new Rule instance using the specified properties. + * @param [properties] Properties to set + * @returns Rule instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRule): google.cloud.cloudsecuritycompliance.v1.Rule; + + /** + * Encodes the specified Rule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. + * @param message Rule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Rule; + + /** + * Decodes a Rule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Rule; + + /** + * Verifies a Rule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Rule; + + /** + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @param message Rule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CELExpression. */ + interface ICELExpression { + + /** CELExpression resourceTypesValues */ + resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** CELExpression expression */ + expression?: (string|null); + } + + /** Represents a CELExpression. */ + class CELExpression implements ICELExpression { + + /** + * Constructs a new CELExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression); + + /** CELExpression resourceTypesValues. */ + public resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); + + /** CELExpression expression. */ + public expression: string; + + /** CELExpression criteria. */ + public criteria?: "resourceTypesValues"; + + /** + * Creates a new CELExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns CELExpression instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression): google.cloud.cloudsecuritycompliance.v1.CELExpression; + + /** + * Encodes the specified CELExpression message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. + * @param message CELExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CELExpression message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. + * @param message CELExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CELExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CELExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CELExpression; + + /** + * Decodes a CELExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CELExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CELExpression; + + /** + * Verifies a CELExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CELExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CELExpression + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CELExpression; + + /** + * Creates a plain object from a CELExpression message. Also converts values to other types if specified. + * @param message CELExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CELExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CELExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CELExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.IOperationMetadata): google.cloud.cloudsecuritycompliance.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @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; + } + + /** Properties of a Control. */ + interface IControl { + + /** Control name */ + name?: (string|null); + + /** Control displayName */ + displayName?: (string|null); + + /** Control description */ + description?: (string|null); + + /** Control family */ + family?: (google.cloud.cloudsecuritycompliance.v1.Control.Family|keyof typeof google.cloud.cloudsecuritycompliance.v1.Control.Family|null); + + /** Control controlFamily */ + controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** Control responsibilityType */ + responsibilityType?: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null); + + /** Control googleResponsibilityDescription */ + googleResponsibilityDescription?: (string|null); + + /** Control googleResponsibilityImplementation */ + googleResponsibilityImplementation?: (string|null); + + /** Control customerResponsibilityDescription */ + customerResponsibilityDescription?: (string|null); + + /** Control customerResponsibilityImplementation */ + customerResponsibilityImplementation?: (string|null); + + /** Control sharedResponsibilityDescription */ + sharedResponsibilityDescription?: (string|null); + + /** Control additionalContentUri */ + additionalContentUri?: (string|null); + + /** Control relatedFrameworks */ + relatedFrameworks?: (string[]|null); + } + + /** Represents a Control. */ + class Control implements IControl { + + /** + * Constructs a new Control. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControl); + + /** Control name. */ + public name: string; + + /** Control displayName. */ + public displayName: string; + + /** Control description. */ + public description: string; + + /** Control family. */ + public family: (google.cloud.cloudsecuritycompliance.v1.Control.Family|keyof typeof google.cloud.cloudsecuritycompliance.v1.Control.Family); + + /** Control controlFamily. */ + public controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** Control responsibilityType. */ + public responsibilityType: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType); + + /** Control googleResponsibilityDescription. */ + public googleResponsibilityDescription: string; + + /** Control googleResponsibilityImplementation. */ + public googleResponsibilityImplementation: string; + + /** Control customerResponsibilityDescription. */ + public customerResponsibilityDescription: string; + + /** Control customerResponsibilityImplementation. */ + public customerResponsibilityImplementation: string; + + /** Control sharedResponsibilityDescription. */ + public sharedResponsibilityDescription: string; + + /** Control additionalContentUri. */ + public additionalContentUri: string; + + /** Control relatedFrameworks. */ + public relatedFrameworks: string[]; + + /** + * Creates a new Control instance using the specified properties. + * @param [properties] Properties to set + * @returns Control instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControl): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Encodes the specified Control message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @param message Control message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @param message Control message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Control message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Decodes a Control message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Verifies a Control message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Control message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Control + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @param message Control + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Control, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Control to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Control + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Control { + + /** Family enum. */ + enum Family { + FAMILY_UNSPECIFIED = 0, + AC = 1, + AT = 2, + AU = 3, + CA = 4, + CM = 5, + CP = 6, + IA = 7, + IR = 8, + MA = 9, + MP = 10, + PE = 11, + PL = 12, + PS = 13, + RA = 14, + SA = 15, + SC = 16, + SI = 17, + SR = 18 + } + } + + /** Properties of a ControlFamily. */ + interface IControlFamily { + + /** ControlFamily familyId */ + familyId?: (string|null); + + /** ControlFamily displayName */ + displayName?: (string|null); + } + + /** Represents a ControlFamily. */ + class ControlFamily implements IControlFamily { + + /** + * Constructs a new ControlFamily. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlFamily); + + /** ControlFamily familyId. */ + public familyId: string; + + /** ControlFamily displayName. */ + public displayName: string; + + /** + * Creates a new ControlFamily instance using the specified properties. + * @param [properties] Properties to set + * @returns ControlFamily instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlFamily): google.cloud.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Encodes the specified ControlFamily message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. + * @param message ControlFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ControlFamily message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. + * @param message ControlFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ControlFamily message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ControlFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Decodes a ControlFamily message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ControlFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Verifies a ControlFamily message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ControlFamily message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ControlFamily + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlFamily; + + /** + * Creates a plain object from a ControlFamily message. Also converts values to other types if specified. + * @param message ControlFamily + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ControlFamily to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ControlFamily + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a CmEnrollmentService */ + class CmEnrollmentService extends $protobuf.rpc.Service { + + /** + * Constructs a new CmEnrollmentService 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 CmEnrollmentService 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): CmEnrollmentService; + + /** + * Calls UpdateCmEnrollment. + * @param request UpdateCmEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CmEnrollment + */ + public updateCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, callback: google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollmentCallback): void; + + /** + * Calls UpdateCmEnrollment. + * @param request UpdateCmEnrollmentRequest message or plain object + * @returns Promise + */ + public updateCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest): Promise; + + /** + * Calls CalculateEffectiveCmEnrollment. + * @param request CalculateEffectiveCmEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CalculateEffectiveCmEnrollmentResponse + */ + public calculateEffectiveCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, callback: google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollmentCallback): void; + + /** + * Calls CalculateEffectiveCmEnrollment. + * @param request CalculateEffectiveCmEnrollmentRequest message or plain object + * @returns Promise + */ + public calculateEffectiveCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest): Promise; + } + + namespace CmEnrollmentService { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|updateCmEnrollment}. + * @param error Error, if any + * @param [response] CmEnrollment + */ + type UpdateCmEnrollmentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CmEnrollment) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|calculateEffectiveCmEnrollment}. + * @param error Error, if any + * @param [response] CalculateEffectiveCmEnrollmentResponse + */ + type CalculateEffectiveCmEnrollmentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse) => void; + } + + /** Properties of an UpdateCmEnrollmentRequest. */ + interface IUpdateCmEnrollmentRequest { + + /** UpdateCmEnrollmentRequest cmEnrollment */ + cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + + /** UpdateCmEnrollmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateCmEnrollmentRequest. */ + class UpdateCmEnrollmentRequest implements IUpdateCmEnrollmentRequest { + + /** + * Constructs a new UpdateCmEnrollmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest); + + /** UpdateCmEnrollmentRequest cmEnrollment. */ + public cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + + /** UpdateCmEnrollmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateCmEnrollmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCmEnrollmentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Encodes the specified UpdateCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. + * @param message UpdateCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. + * @param message UpdateCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Verifies an UpdateCmEnrollmentRequest message. + * @param message Plain 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 UpdateCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCmEnrollmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; + + /** + * Creates a plain object from an UpdateCmEnrollmentRequest message. Also converts values to other types if specified. + * @param message UpdateCmEnrollmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCmEnrollmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCmEnrollmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateEffectiveCmEnrollmentRequest. */ + interface ICalculateEffectiveCmEnrollmentRequest { + + /** CalculateEffectiveCmEnrollmentRequest name */ + name?: (string|null); + } + + /** Represents a CalculateEffectiveCmEnrollmentRequest. */ + class CalculateEffectiveCmEnrollmentRequest implements ICalculateEffectiveCmEnrollmentRequest { + + /** + * Constructs a new CalculateEffectiveCmEnrollmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest); + + /** CalculateEffectiveCmEnrollmentRequest name. */ + public name: string; + + /** + * Creates a new CalculateEffectiveCmEnrollmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateEffectiveCmEnrollmentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateEffectiveCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateEffectiveCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Verifies a CalculateEffectiveCmEnrollmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateEffectiveCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateEffectiveCmEnrollmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; + + /** + * Creates a plain object from a CalculateEffectiveCmEnrollmentRequest message. Also converts values to other types if specified. + * @param message CalculateEffectiveCmEnrollmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateEffectiveCmEnrollmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateEffectiveCmEnrollmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CmEnrollment. */ + interface ICmEnrollment { + + /** CmEnrollment name */ + name?: (string|null); + + /** CmEnrollment enrolled */ + enrolled?: (boolean|null); + + /** CmEnrollment auditConfig */ + auditConfig?: (google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null); + } + + /** Represents a CmEnrollment. */ + class CmEnrollment implements ICmEnrollment { + + /** + * Constructs a new CmEnrollment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment); + + /** CmEnrollment name. */ + public name: string; + + /** CmEnrollment enrolled. */ + public enrolled: boolean; + + /** CmEnrollment auditConfig. */ + public auditConfig?: (google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null); + + /** + * Creates a new CmEnrollment instance using the specified properties. + * @param [properties] Properties to set + * @returns CmEnrollment instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Encodes the specified CmEnrollment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. + * @param message CmEnrollment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CmEnrollment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. + * @param message CmEnrollment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CmEnrollment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CmEnrollment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Decodes a CmEnrollment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CmEnrollment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Verifies a CmEnrollment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CmEnrollment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmEnrollment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; + + /** + * Creates a plain object from a CmEnrollment message. Also converts values to other types if specified. + * @param message CmEnrollment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CmEnrollment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CmEnrollment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmEnrollment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateEffectiveCmEnrollmentResponse. */ + interface ICalculateEffectiveCmEnrollmentResponse { + + /** CalculateEffectiveCmEnrollmentResponse cmEnrollment */ + cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + } + + /** Represents a CalculateEffectiveCmEnrollmentResponse. */ + class CalculateEffectiveCmEnrollmentResponse implements ICalculateEffectiveCmEnrollmentResponse { + + /** + * Constructs a new CalculateEffectiveCmEnrollmentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse); + + /** CalculateEffectiveCmEnrollmentResponse cmEnrollment. */ + public cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); + + /** + * Creates a new CalculateEffectiveCmEnrollmentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateEffectiveCmEnrollmentResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. + * @param message CalculateEffectiveCmEnrollmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateEffectiveCmEnrollmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateEffectiveCmEnrollmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Verifies a CalculateEffectiveCmEnrollmentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateEffectiveCmEnrollmentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateEffectiveCmEnrollmentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; + + /** + * Creates a plain object from a CalculateEffectiveCmEnrollmentResponse message. Also converts values to other types if specified. + * @param message CalculateEffectiveCmEnrollmentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateEffectiveCmEnrollmentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateEffectiveCmEnrollmentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig destinations */ + destinations?: (google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAuditConfig); + + /** AuditConfig destinations. */ + public destinations: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAuditConfig): google.cloud.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfig { + + /** Properties of a CmEligibleDestination. */ + interface ICmEligibleDestination { + + /** CmEligibleDestination gcsBucket */ + gcsBucket?: (string|null); + } + + /** Represents a CmEligibleDestination. */ + class CmEligibleDestination implements ICmEligibleDestination { + + /** + * Constructs a new CmEligibleDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination); + + /** CmEligibleDestination gcsBucket. */ + public gcsBucket?: (string|null); + + /** CmEligibleDestination cmEligibleDestinations. */ + public cmEligibleDestinations?: "gcsBucket"; + + /** + * Creates a new CmEligibleDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns CmEligibleDestination instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Encodes the specified CmEligibleDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. + * @param message CmEligibleDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CmEligibleDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. + * @param message CmEligibleDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CmEligibleDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CmEligibleDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Decodes a CmEligibleDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CmEligibleDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Verifies a CmEligibleDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CmEligibleDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CmEligibleDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; + + /** + * Creates a plain object from a CmEligibleDestination message. Also converts values to other types if specified. + * @param message CmEligibleDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CmEligibleDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CmEligibleDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a Config */ + class Config extends $protobuf.rpc.Service { + + /** + * Constructs a new Config 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 Config 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): Config; + + /** + * Calls ListFrameworks. + * @param request ListFrameworksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworksResponse + */ + public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworksCallback): void; + + /** + * Calls ListFrameworks. + * @param request ListFrameworksRequest message or plain object + * @returns Promise + */ + public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): Promise; + + /** + * Calls GetFramework. + * @param request GetFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Framework + */ + public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetFrameworkCallback): void; + + /** + * Calls GetFramework. + * @param request GetFrameworkRequest message or plain object + * @returns Promise + */ + public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): Promise; + + /** + * Calls CreateFramework. + * @param request CreateFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Framework + */ + public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateFrameworkCallback): void; + + /** + * Calls CreateFramework. + * @param request CreateFrameworkRequest message or plain object + * @returns Promise + */ + public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): Promise; + + /** + * Calls UpdateFramework. + * @param request UpdateFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Framework + */ + public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateFrameworkCallback): void; + + /** + * Calls UpdateFramework. + * @param request UpdateFrameworkRequest message or plain object + * @returns Promise + */ + public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): Promise; + + /** + * Calls DeleteFramework. + * @param request DeleteFrameworkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteFrameworkCallback): void; + + /** + * Calls DeleteFramework. + * @param request DeleteFrameworkRequest message or plain object + * @returns Promise + */ + public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): Promise; + + /** + * Calls ListCloudControls. + * @param request ListCloudControlsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCloudControlsResponse + */ + public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControlsCallback): void; + + /** + * Calls ListCloudControls. + * @param request ListCloudControlsRequest message or plain object + * @returns Promise + */ + public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): Promise; + + /** + * Calls GetCloudControl. + * @param request GetCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControl + */ + public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControlCallback): void; + + /** + * Calls GetCloudControl. + * @param request GetCloudControlRequest message or plain object + * @returns Promise + */ + public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): Promise; + + /** + * Calls CreateCloudControl. + * @param request CreateCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControl + */ + public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControlCallback): void; + + /** + * Calls CreateCloudControl. + * @param request CreateCloudControlRequest message or plain object + * @returns Promise + */ + public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): Promise; + + /** + * Calls UpdateCloudControl. + * @param request UpdateCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControl + */ + public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControlCallback): void; + + /** + * Calls UpdateCloudControl. + * @param request UpdateCloudControlRequest message or plain object + * @returns Promise + */ + public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): Promise; + + /** + * Calls DeleteCloudControl. + * @param request DeleteCloudControlRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControlCallback): void; + + /** + * Calls DeleteCloudControl. + * @param request DeleteCloudControlRequest message or plain object + * @returns Promise + */ + public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): Promise; + } + + namespace Config { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listFrameworks}. + * @param error Error, if any + * @param [response] ListFrameworksResponse + */ + type ListFrameworksCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getFramework}. + * @param error Error, if any + * @param [response] Framework + */ + type GetFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createFramework}. + * @param error Error, if any + * @param [response] Framework + */ + type CreateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateFramework}. + * @param error Error, if any + * @param [response] Framework + */ + type UpdateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteFramework}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteFrameworkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listCloudControls}. + * @param error Error, if any + * @param [response] ListCloudControlsResponse + */ + type ListCloudControlsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getCloudControl}. + * @param error Error, if any + * @param [response] CloudControl + */ + type GetCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createCloudControl}. + * @param error Error, if any + * @param [response] CloudControl + */ + type CreateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateCloudControl}. + * @param error Error, if any + * @param [response] CloudControl + */ + type UpdateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteCloudControl}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteCloudControlCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a ListFrameworksRequest. */ + interface IListFrameworksRequest { + + /** ListFrameworksRequest parent */ + parent?: (string|null); + + /** ListFrameworksRequest pageSize */ + pageSize?: (number|null); + + /** ListFrameworksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListFrameworksRequest. */ + class ListFrameworksRequest implements IListFrameworksRequest { + + /** + * Constructs a new ListFrameworksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest); + + /** ListFrameworksRequest parent. */ + public parent: string; + + /** ListFrameworksRequest pageSize. */ + public pageSize: number; + + /** ListFrameworksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListFrameworksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworksRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Encodes the specified ListFrameworksRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. + * @param message ListFrameworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworksRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. + * @param message ListFrameworksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Decodes a ListFrameworksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Verifies a ListFrameworksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; + + /** + * Creates a plain object from a ListFrameworksRequest message. Also converts values to other types if specified. + * @param message ListFrameworksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFrameworksResponse. */ + interface IListFrameworksResponse { + + /** ListFrameworksResponse frameworks */ + frameworks?: (google.cloud.cloudsecuritycompliance.v1.IFramework[]|null); + + /** ListFrameworksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFrameworksResponse. */ + class ListFrameworksResponse implements IListFrameworksResponse { + + /** + * Constructs a new ListFrameworksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse); + + /** ListFrameworksResponse frameworks. */ + public frameworks: google.cloud.cloudsecuritycompliance.v1.IFramework[]; + + /** ListFrameworksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFrameworksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworksResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Encodes the specified ListFrameworksResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. + * @param message ListFrameworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworksResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. + * @param message ListFrameworksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Decodes a ListFrameworksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Verifies a ListFrameworksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; + + /** + * Creates a plain object from a ListFrameworksResponse message. Also converts values to other types if specified. + * @param message ListFrameworksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFrameworkRequest. */ + interface IGetFrameworkRequest { + + /** GetFrameworkRequest name */ + name?: (string|null); + + /** GetFrameworkRequest majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + } + + /** Represents a GetFrameworkRequest. */ + class GetFrameworkRequest implements IGetFrameworkRequest { + + /** + * Constructs a new GetFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest); + + /** GetFrameworkRequest name. */ + public name: string; + + /** GetFrameworkRequest majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** + * Creates a new GetFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Encodes the specified GetFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. + * @param message GetFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. + * @param message GetFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Decodes a GetFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Verifies a GetFrameworkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; + + /** + * Creates a plain object from a GetFrameworkRequest message. Also converts values to other types if specified. + * @param message GetFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFrameworkRequest. */ + interface ICreateFrameworkRequest { + + /** CreateFrameworkRequest parent */ + parent?: (string|null); + + /** CreateFrameworkRequest frameworkId */ + frameworkId?: (string|null); + + /** CreateFrameworkRequest framework */ + framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + } + + /** Represents a CreateFrameworkRequest. */ + class CreateFrameworkRequest implements ICreateFrameworkRequest { + + /** + * Constructs a new CreateFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest); + + /** CreateFrameworkRequest parent. */ + public parent: string; + + /** CreateFrameworkRequest frameworkId. */ + public frameworkId: string; + + /** CreateFrameworkRequest framework. */ + public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + + /** + * Creates a new CreateFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Encodes the specified CreateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. + * @param message CreateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. + * @param message CreateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Decodes a CreateFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Verifies a CreateFrameworkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; + + /** + * Creates a plain object from a CreateFrameworkRequest message. Also converts values to other types if specified. + * @param message CreateFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFrameworkRequest. */ + interface IUpdateFrameworkRequest { + + /** UpdateFrameworkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFrameworkRequest framework */ + framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + + /** UpdateFrameworkRequest majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + } + + /** Represents an UpdateFrameworkRequest. */ + class UpdateFrameworkRequest implements IUpdateFrameworkRequest { + + /** + * Constructs a new UpdateFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest); + + /** UpdateFrameworkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFrameworkRequest framework. */ + public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); + + /** UpdateFrameworkRequest majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** + * Creates a new UpdateFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Encodes the specified UpdateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. + * @param message UpdateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. + * @param message UpdateFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Decodes an UpdateFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Verifies an UpdateFrameworkRequest message. + * @param message Plain 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 UpdateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; + + /** + * Creates a plain object from an UpdateFrameworkRequest message. Also converts values to other types if specified. + * @param message UpdateFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFrameworkRequest. */ + interface IDeleteFrameworkRequest { + + /** DeleteFrameworkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteFrameworkRequest. */ + class DeleteFrameworkRequest implements IDeleteFrameworkRequest { + + /** + * Constructs a new DeleteFrameworkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest); + + /** DeleteFrameworkRequest name. */ + public name: string; + + /** + * Creates a new DeleteFrameworkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFrameworkRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Encodes the specified DeleteFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. + * @param message DeleteFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. + * @param message DeleteFrameworkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFrameworkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Decodes a DeleteFrameworkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Verifies a DeleteFrameworkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFrameworkRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; + + /** + * Creates a plain object from a DeleteFrameworkRequest message. Also converts values to other types if specified. + * @param message DeleteFrameworkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFrameworkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFrameworkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCloudControlsRequest. */ + interface IListCloudControlsRequest { + + /** ListCloudControlsRequest parent */ + parent?: (string|null); + + /** ListCloudControlsRequest pageSize */ + pageSize?: (number|null); + + /** ListCloudControlsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCloudControlsRequest. */ + class ListCloudControlsRequest implements IListCloudControlsRequest { + + /** + * Constructs a new ListCloudControlsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest); + + /** ListCloudControlsRequest parent. */ + public parent: string; + + /** ListCloudControlsRequest pageSize. */ + public pageSize: number; + + /** ListCloudControlsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCloudControlsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCloudControlsRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Encodes the specified ListCloudControlsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. + * @param message ListCloudControlsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCloudControlsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. + * @param message ListCloudControlsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCloudControlsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCloudControlsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Decodes a ListCloudControlsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCloudControlsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Verifies a ListCloudControlsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCloudControlsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCloudControlsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; + + /** + * Creates a plain object from a ListCloudControlsRequest message. Also converts values to other types if specified. + * @param message ListCloudControlsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCloudControlsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCloudControlsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCloudControlsResponse. */ + interface IListCloudControlsResponse { + + /** ListCloudControlsResponse cloudControls */ + cloudControls?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl[]|null); + + /** ListCloudControlsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCloudControlsResponse. */ + class ListCloudControlsResponse implements IListCloudControlsResponse { + + /** + * Constructs a new ListCloudControlsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse); + + /** ListCloudControlsResponse cloudControls. */ + public cloudControls: google.cloud.cloudsecuritycompliance.v1.ICloudControl[]; + + /** ListCloudControlsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCloudControlsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCloudControlsResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Encodes the specified ListCloudControlsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. + * @param message ListCloudControlsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCloudControlsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. + * @param message ListCloudControlsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCloudControlsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCloudControlsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Decodes a ListCloudControlsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCloudControlsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Verifies a ListCloudControlsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCloudControlsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCloudControlsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; + + /** + * Creates a plain object from a ListCloudControlsResponse message. Also converts values to other types if specified. + * @param message ListCloudControlsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCloudControlsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCloudControlsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCloudControlRequest. */ + interface IGetCloudControlRequest { + + /** GetCloudControlRequest name */ + name?: (string|null); + + /** GetCloudControlRequest majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + } + + /** Represents a GetCloudControlRequest. */ + class GetCloudControlRequest implements IGetCloudControlRequest { + + /** + * Constructs a new GetCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest); + + /** GetCloudControlRequest name. */ + public name: string; + + /** GetCloudControlRequest majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** + * Creates a new GetCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Encodes the specified GetCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. + * @param message GetCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. + * @param message GetCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Decodes a GetCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Verifies a GetCloudControlRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; + + /** + * Creates a plain object from a GetCloudControlRequest message. Also converts values to other types if specified. + * @param message GetCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCloudControlRequest. */ + interface ICreateCloudControlRequest { + + /** CreateCloudControlRequest parent */ + parent?: (string|null); + + /** CreateCloudControlRequest cloudControlId */ + cloudControlId?: (string|null); + + /** CreateCloudControlRequest cloudControl */ + cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + } + + /** Represents a CreateCloudControlRequest. */ + class CreateCloudControlRequest implements ICreateCloudControlRequest { + + /** + * Constructs a new CreateCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest); + + /** CreateCloudControlRequest parent. */ + public parent: string; + + /** CreateCloudControlRequest cloudControlId. */ + public cloudControlId: string; + + /** CreateCloudControlRequest cloudControl. */ + public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** + * Creates a new CreateCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Encodes the specified CreateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. + * @param message CreateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. + * @param message CreateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Decodes a CreateCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Verifies a CreateCloudControlRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; + + /** + * Creates a plain object from a CreateCloudControlRequest message. Also converts values to other types if specified. + * @param message CreateCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCloudControlRequest. */ + interface IUpdateCloudControlRequest { + + /** UpdateCloudControlRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCloudControlRequest cloudControl */ + cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + } + + /** Represents an UpdateCloudControlRequest. */ + class UpdateCloudControlRequest implements IUpdateCloudControlRequest { + + /** + * Constructs a new UpdateCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest); + + /** UpdateCloudControlRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCloudControlRequest cloudControl. */ + public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** + * Creates a new UpdateCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Encodes the specified UpdateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. + * @param message UpdateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. + * @param message UpdateCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Decodes an UpdateCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Verifies an UpdateCloudControlRequest message. + * @param message Plain 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 UpdateCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; + + /** + * Creates a plain object from an UpdateCloudControlRequest message. Also converts values to other types if specified. + * @param message UpdateCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteCloudControlRequest. */ + interface IDeleteCloudControlRequest { + + /** DeleteCloudControlRequest name */ + name?: (string|null); + } + + /** Represents a DeleteCloudControlRequest. */ + class DeleteCloudControlRequest implements IDeleteCloudControlRequest { + + /** + * Constructs a new DeleteCloudControlRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest); + + /** DeleteCloudControlRequest name. */ + public name: string; + + /** + * Creates a new DeleteCloudControlRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteCloudControlRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Encodes the specified DeleteCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. + * @param message DeleteCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. + * @param message DeleteCloudControlRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteCloudControlRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Decodes a DeleteCloudControlRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Verifies a DeleteCloudControlRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteCloudControlRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; + + /** + * Creates a plain object from a DeleteCloudControlRequest message. Also converts values to other types if specified. + * @param message DeleteCloudControlRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteCloudControlRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteCloudControlRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a Deployment */ + class Deployment extends $protobuf.rpc.Service { + + /** + * Constructs a new Deployment 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 Deployment 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): Deployment; + + /** + * Calls CreateFrameworkDeployment. + * @param request CreateFrameworkDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeploymentCallback): void; + + /** + * Calls CreateFrameworkDeployment. + * @param request CreateFrameworkDeploymentRequest message or plain object + * @returns Promise + */ + public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): Promise; + + /** + * Calls DeleteFrameworkDeployment. + * @param request DeleteFrameworkDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeploymentCallback): void; + + /** + * Calls DeleteFrameworkDeployment. + * @param request DeleteFrameworkDeploymentRequest message or plain object + * @returns Promise + */ + public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): Promise; + + /** + * Calls GetFrameworkDeployment. + * @param request GetFrameworkDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FrameworkDeployment + */ + public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeploymentCallback): void; + + /** + * Calls GetFrameworkDeployment. + * @param request GetFrameworkDeploymentRequest message or plain object + * @returns Promise + */ + public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): Promise; + + /** + * Calls ListFrameworkDeployments. + * @param request ListFrameworkDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworkDeploymentsResponse + */ + public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeploymentsCallback): void; + + /** + * Calls ListFrameworkDeployments. + * @param request ListFrameworkDeploymentsRequest message or plain object + * @returns Promise + */ + public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): Promise; + + /** + * Calls GetCloudControlDeployment. + * @param request GetCloudControlDeploymentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CloudControlDeployment + */ + public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeploymentCallback): void; + + /** + * Calls GetCloudControlDeployment. + * @param request GetCloudControlDeploymentRequest message or plain object + * @returns Promise + */ + public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): Promise; + + /** + * Calls ListCloudControlDeployments. + * @param request ListCloudControlDeploymentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCloudControlDeploymentsResponse + */ + public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeploymentsCallback): void; + + /** + * Calls ListCloudControlDeployments. + * @param request ListCloudControlDeploymentsRequest message or plain object + * @returns Promise + */ + public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): Promise; + } + + namespace Deployment { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|createFrameworkDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|deleteFrameworkDeployment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getFrameworkDeployment}. + * @param error Error, if any + * @param [response] FrameworkDeployment + */ + type GetFrameworkDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listFrameworkDeployments}. + * @param error Error, if any + * @param [response] ListFrameworkDeploymentsResponse + */ + type ListFrameworkDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getCloudControlDeployment}. + * @param error Error, if any + * @param [response] CloudControlDeployment + */ + type GetCloudControlDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listCloudControlDeployments}. + * @param error Error, if any + * @param [response] ListCloudControlDeploymentsResponse + */ + type ListCloudControlDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse) => void; + } + + /** DeploymentState enum. */ + enum DeploymentState { + DEPLOYMENT_STATE_UNSPECIFIED = 0, + DEPLOYMENT_STATE_VALIDATING = 1, + DEPLOYMENT_STATE_CREATING = 2, + DEPLOYMENT_STATE_DELETING = 3, + DEPLOYMENT_STATE_UPDATING = 8, + DEPLOYMENT_STATE_FAILED = 4, + DEPLOYMENT_STATE_READY = 5, + DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6, + DEPLOYMENT_STATE_PARTIALLY_DELETED = 7 + } + + /** Properties of a FrameworkDeployment. */ + interface IFrameworkDeployment { + + /** FrameworkDeployment name */ + name?: (string|null); + + /** FrameworkDeployment targetResourceConfig */ + targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** FrameworkDeployment computedTargetResource */ + computedTargetResource?: (string|null); + + /** FrameworkDeployment framework */ + framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeployment description */ + description?: (string|null); + + /** FrameworkDeployment cloudControlMetadata */ + cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]|null); + + /** FrameworkDeployment deploymentState */ + deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); + + /** FrameworkDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment etag */ + etag?: (string|null); + + /** FrameworkDeployment targetResourceDisplayName */ + targetResourceDisplayName?: (string|null); + + /** FrameworkDeployment cloudControlDeploymentReferences */ + cloudControlDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]|null); + } + + /** Represents a FrameworkDeployment. */ + class FrameworkDeployment implements IFrameworkDeployment { + + /** + * Constructs a new FrameworkDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment); + + /** FrameworkDeployment name. */ + public name: string; + + /** FrameworkDeployment targetResourceConfig. */ + public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** FrameworkDeployment computedTargetResource. */ + public computedTargetResource: string; + + /** FrameworkDeployment framework. */ + public framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeployment description. */ + public description: string; + + /** FrameworkDeployment cloudControlMetadata. */ + public cloudControlMetadata: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]; + + /** FrameworkDeployment deploymentState. */ + public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); + + /** FrameworkDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkDeployment etag. */ + public etag: string; + + /** FrameworkDeployment targetResourceDisplayName. */ + public targetResourceDisplayName: string; + + /** FrameworkDeployment cloudControlDeploymentReferences. */ + public cloudControlDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]; + + /** + * Creates a new FrameworkDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkDeployment instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Encodes the specified FrameworkDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. + * @param message FrameworkDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. + * @param message FrameworkDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Decodes a FrameworkDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Verifies a FrameworkDeployment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FrameworkDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; + + /** + * Creates a plain object from a FrameworkDeployment message. Also converts values to other types if specified. + * @param message FrameworkDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkDeployment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlDeployment. */ + interface ICloudControlDeployment { + + /** CloudControlDeployment name */ + name?: (string|null); + + /** CloudControlDeployment targetResourceConfig */ + targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** CloudControlDeployment targetResource */ + targetResource?: (string|null); + + /** CloudControlDeployment cloudControlMetadata */ + cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); + + /** CloudControlDeployment description */ + description?: (string|null); + + /** CloudControlDeployment deploymentState */ + deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); + + /** CloudControlDeployment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment etag */ + etag?: (string|null); + + /** CloudControlDeployment parameterSubstitutedCloudControl */ + parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** CloudControlDeployment frameworkDeploymentReferences */ + frameworkDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]|null); + + /** CloudControlDeployment targetResourceDisplayName */ + targetResourceDisplayName?: (string|null); + } + + /** Represents a CloudControlDeployment. */ + class CloudControlDeployment implements ICloudControlDeployment { + + /** + * Constructs a new CloudControlDeployment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment); + + /** CloudControlDeployment name. */ + public name: string; + + /** CloudControlDeployment targetResourceConfig. */ + public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); + + /** CloudControlDeployment targetResource. */ + public targetResource: string; + + /** CloudControlDeployment cloudControlMetadata. */ + public cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); + + /** CloudControlDeployment description. */ + public description: string; + + /** CloudControlDeployment deploymentState. */ + public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); + + /** CloudControlDeployment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** CloudControlDeployment etag. */ + public etag: string; + + /** CloudControlDeployment parameterSubstitutedCloudControl. */ + public parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); + + /** CloudControlDeployment frameworkDeploymentReferences. */ + public frameworkDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]; + + /** CloudControlDeployment targetResourceDisplayName. */ + public targetResourceDisplayName: string; + + /** + * Creates a new CloudControlDeployment instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlDeployment instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Encodes the specified CloudControlDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. + * @param message CloudControlDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. + * @param message CloudControlDeployment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlDeployment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Decodes a CloudControlDeployment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Verifies a CloudControlDeployment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlDeployment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlDeployment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; + + /** + * Creates a plain object from a CloudControlDeployment message. Also converts values to other types if specified. + * @param message CloudControlDeployment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlDeployment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlDeployment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResourceConfig. */ + interface ITargetResourceConfig { + + /** TargetResourceConfig existingTargetResource */ + existingTargetResource?: (string|null); + + /** TargetResourceConfig targetResourceCreationConfig */ + targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); + } + + /** Represents a TargetResourceConfig. */ + class TargetResourceConfig implements ITargetResourceConfig { + + /** + * Constructs a new TargetResourceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig); + + /** TargetResourceConfig existingTargetResource. */ + public existingTargetResource?: (string|null); + + /** TargetResourceConfig targetResourceCreationConfig. */ + public targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); + + /** TargetResourceConfig resourceConfig. */ + public resourceConfig?: ("existingTargetResource"|"targetResourceCreationConfig"); + + /** + * Creates a new TargetResourceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResourceConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Encodes the specified TargetResourceConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. + * @param message TargetResourceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResourceConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. + * @param message TargetResourceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResourceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Decodes a TargetResourceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Verifies a TargetResourceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResourceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResourceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; + + /** + * Creates a plain object from a TargetResourceConfig message. Also converts values to other types if specified. + * @param message TargetResourceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResourceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResourceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResourceCreationConfig. */ + interface ITargetResourceCreationConfig { + + /** TargetResourceCreationConfig folderCreationConfig */ + folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); + + /** TargetResourceCreationConfig projectCreationConfig */ + projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); + } + + /** Represents a TargetResourceCreationConfig. */ + class TargetResourceCreationConfig implements ITargetResourceCreationConfig { + + /** + * Constructs a new TargetResourceCreationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig); + + /** TargetResourceCreationConfig folderCreationConfig. */ + public folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); + + /** TargetResourceCreationConfig projectCreationConfig. */ + public projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); + + /** TargetResourceCreationConfig resourceCreationConfig. */ + public resourceCreationConfig?: ("folderCreationConfig"|"projectCreationConfig"); + + /** + * Creates a new TargetResourceCreationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResourceCreationConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Encodes the specified TargetResourceCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. + * @param message TargetResourceCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResourceCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. + * @param message TargetResourceCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResourceCreationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResourceCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Decodes a TargetResourceCreationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResourceCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Verifies a TargetResourceCreationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResourceCreationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResourceCreationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; + + /** + * Creates a plain object from a TargetResourceCreationConfig message. Also converts values to other types if specified. + * @param message TargetResourceCreationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResourceCreationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResourceCreationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FolderCreationConfig. */ + interface IFolderCreationConfig { + + /** FolderCreationConfig parent */ + parent?: (string|null); + + /** FolderCreationConfig folderDisplayName */ + folderDisplayName?: (string|null); + } + + /** Represents a FolderCreationConfig. */ + class FolderCreationConfig implements IFolderCreationConfig { + + /** + * Constructs a new FolderCreationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig); + + /** FolderCreationConfig parent. */ + public parent: string; + + /** FolderCreationConfig folderDisplayName. */ + public folderDisplayName: string; + + /** + * Creates a new FolderCreationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns FolderCreationConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Encodes the specified FolderCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. + * @param message FolderCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FolderCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. + * @param message FolderCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FolderCreationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FolderCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Decodes a FolderCreationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FolderCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Verifies a FolderCreationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FolderCreationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FolderCreationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; + + /** + * Creates a plain object from a FolderCreationConfig message. Also converts values to other types if specified. + * @param message FolderCreationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FolderCreationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FolderCreationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProjectCreationConfig. */ + interface IProjectCreationConfig { + + /** ProjectCreationConfig parent */ + parent?: (string|null); + + /** ProjectCreationConfig projectDisplayName */ + projectDisplayName?: (string|null); + + /** ProjectCreationConfig billingAccountId */ + billingAccountId?: (string|null); + } + + /** Represents a ProjectCreationConfig. */ + class ProjectCreationConfig implements IProjectCreationConfig { + + /** + * Constructs a new ProjectCreationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig); + + /** ProjectCreationConfig parent. */ + public parent: string; + + /** ProjectCreationConfig projectDisplayName. */ + public projectDisplayName: string; + + /** ProjectCreationConfig billingAccountId. */ + public billingAccountId: string; + + /** + * Creates a new ProjectCreationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectCreationConfig instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; + + /** + * Encodes the specified ProjectCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. + * @param message ProjectCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProjectCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. + * @param message ProjectCreationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProjectCreationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; + + /** + * Decodes a ProjectCreationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProjectCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; + + /** + * Verifies a ProjectCreationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProjectCreationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProjectCreationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; + + /** + * Creates a plain object from a ProjectCreationConfig message. Also converts values to other types if specified. + * @param message ProjectCreationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProjectCreationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProjectCreationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlMetadata. */ + interface ICloudControlMetadata { + + /** CloudControlMetadata cloudControlDetails */ + cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); + + /** CloudControlMetadata enforcementMode */ + enforcementMode?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null); + } + + /** Represents a CloudControlMetadata. */ + class CloudControlMetadata implements ICloudControlMetadata { + + /** + * Constructs a new CloudControlMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata); + + /** CloudControlMetadata cloudControlDetails. */ + public cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); + + /** CloudControlMetadata enforcementMode. */ + public enforcementMode: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode); + + /** + * Creates a new CloudControlMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlMetadata instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Encodes the specified CloudControlMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. + * @param message CloudControlMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. + * @param message CloudControlMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Decodes a CloudControlMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Verifies a CloudControlMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; + + /** + * Creates a plain object from a CloudControlMetadata message. Also converts values to other types if specified. + * @param message CloudControlMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFrameworkDeploymentRequest. */ + interface ICreateFrameworkDeploymentRequest { + + /** CreateFrameworkDeploymentRequest parent */ + parent?: (string|null); + + /** CreateFrameworkDeploymentRequest frameworkDeploymentId */ + frameworkDeploymentId?: (string|null); + + /** CreateFrameworkDeploymentRequest frameworkDeployment */ + frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); + } + + /** Represents a CreateFrameworkDeploymentRequest. */ + class CreateFrameworkDeploymentRequest implements ICreateFrameworkDeploymentRequest { + + /** + * Constructs a new CreateFrameworkDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest); + + /** CreateFrameworkDeploymentRequest parent. */ + public parent: string; + + /** CreateFrameworkDeploymentRequest frameworkDeploymentId. */ + public frameworkDeploymentId: string; + + /** CreateFrameworkDeploymentRequest frameworkDeployment. */ + public frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); + + /** + * Creates a new CreateFrameworkDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFrameworkDeploymentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + + /** + * Encodes the specified CreateFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. + * @param message CreateFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. + * @param message CreateFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + + /** + * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + + /** + * Verifies a CreateFrameworkDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFrameworkDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; + + /** + * Creates a plain object from a CreateFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @param message CreateFrameworkDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFrameworkDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFrameworkDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFrameworkDeploymentRequest. */ + interface IDeleteFrameworkDeploymentRequest { + + /** DeleteFrameworkDeploymentRequest name */ + name?: (string|null); + + /** DeleteFrameworkDeploymentRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteFrameworkDeploymentRequest. */ + class DeleteFrameworkDeploymentRequest implements IDeleteFrameworkDeploymentRequest { + + /** + * Constructs a new DeleteFrameworkDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest); + + /** DeleteFrameworkDeploymentRequest name. */ + public name: string; + + /** DeleteFrameworkDeploymentRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteFrameworkDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFrameworkDeploymentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + + /** + * Encodes the specified DeleteFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. + * @param message DeleteFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. + * @param message DeleteFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + + /** + * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + + /** + * Verifies a DeleteFrameworkDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFrameworkDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; + + /** + * Creates a plain object from a DeleteFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @param message DeleteFrameworkDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFrameworkDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFrameworkDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFrameworkDeploymentRequest. */ + interface IGetFrameworkDeploymentRequest { + + /** GetFrameworkDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a GetFrameworkDeploymentRequest. */ + class GetFrameworkDeploymentRequest implements IGetFrameworkDeploymentRequest { + + /** + * Constructs a new GetFrameworkDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest); + + /** GetFrameworkDeploymentRequest name. */ + public name: string; + + /** + * Creates a new GetFrameworkDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFrameworkDeploymentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + + /** + * Encodes the specified GetFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. + * @param message GetFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. + * @param message GetFrameworkDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + + /** + * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + + /** + * Verifies a GetFrameworkDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFrameworkDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; + + /** + * Creates a plain object from a GetFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @param message GetFrameworkDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFrameworkDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFrameworkDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFrameworkDeploymentsRequest. */ + interface IListFrameworkDeploymentsRequest { + + /** ListFrameworkDeploymentsRequest parent */ + parent?: (string|null); + + /** ListFrameworkDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListFrameworkDeploymentsRequest pageToken */ + pageToken?: (string|null); + + /** ListFrameworkDeploymentsRequest filter */ + filter?: (string|null); + + /** ListFrameworkDeploymentsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListFrameworkDeploymentsRequest. */ + class ListFrameworkDeploymentsRequest implements IListFrameworkDeploymentsRequest { + + /** + * Constructs a new ListFrameworkDeploymentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest); + + /** ListFrameworkDeploymentsRequest parent. */ + public parent: string; + + /** ListFrameworkDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListFrameworkDeploymentsRequest pageToken. */ + public pageToken: string; + + /** ListFrameworkDeploymentsRequest filter. */ + public filter: string; + + /** ListFrameworkDeploymentsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListFrameworkDeploymentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworkDeploymentsRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + + /** + * Encodes the specified ListFrameworkDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. + * @param message ListFrameworkDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworkDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. + * @param message ListFrameworkDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworkDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + + /** + * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworkDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + + /** + * Verifies a ListFrameworkDeploymentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworkDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworkDeploymentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; + + /** + * Creates a plain object from a ListFrameworkDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListFrameworkDeploymentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworkDeploymentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworkDeploymentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFrameworkDeploymentsResponse. */ + interface IListFrameworkDeploymentsResponse { + + /** ListFrameworkDeploymentsResponse frameworkDeployments */ + frameworkDeployments?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]|null); + + /** ListFrameworkDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFrameworkDeploymentsResponse. */ + class ListFrameworkDeploymentsResponse implements IListFrameworkDeploymentsResponse { + + /** + * Constructs a new ListFrameworkDeploymentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse); + + /** ListFrameworkDeploymentsResponse frameworkDeployments. */ + public frameworkDeployments: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]; + + /** ListFrameworkDeploymentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFrameworkDeploymentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworkDeploymentsResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + + /** + * Encodes the specified ListFrameworkDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. + * @param message ListFrameworkDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworkDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. + * @param message ListFrameworkDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworkDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + + /** + * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworkDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + + /** + * Verifies a ListFrameworkDeploymentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworkDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworkDeploymentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; + + /** + * Creates a plain object from a ListFrameworkDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListFrameworkDeploymentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworkDeploymentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworkDeploymentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCloudControlDeploymentRequest. */ + interface IGetCloudControlDeploymentRequest { + + /** GetCloudControlDeploymentRequest name */ + name?: (string|null); + } + + /** Represents a GetCloudControlDeploymentRequest. */ + class GetCloudControlDeploymentRequest implements IGetCloudControlDeploymentRequest { + + /** + * Constructs a new GetCloudControlDeploymentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest); + + /** GetCloudControlDeploymentRequest name. */ + public name: string; + + /** + * Creates a new GetCloudControlDeploymentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCloudControlDeploymentRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + + /** + * Encodes the specified GetCloudControlDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. + * @param message GetCloudControlDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCloudControlDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. + * @param message GetCloudControlDeploymentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCloudControlDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + + /** + * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCloudControlDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + + /** + * Verifies a GetCloudControlDeploymentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCloudControlDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCloudControlDeploymentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; + + /** + * Creates a plain object from a GetCloudControlDeploymentRequest message. Also converts values to other types if specified. + * @param message GetCloudControlDeploymentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCloudControlDeploymentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCloudControlDeploymentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCloudControlDeploymentsRequest. */ + interface IListCloudControlDeploymentsRequest { + + /** ListCloudControlDeploymentsRequest parent */ + parent?: (string|null); + + /** ListCloudControlDeploymentsRequest pageSize */ + pageSize?: (number|null); + + /** ListCloudControlDeploymentsRequest pageToken */ + pageToken?: (string|null); + + /** ListCloudControlDeploymentsRequest filter */ + filter?: (string|null); + + /** ListCloudControlDeploymentsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCloudControlDeploymentsRequest. */ + class ListCloudControlDeploymentsRequest implements IListCloudControlDeploymentsRequest { + + /** + * Constructs a new ListCloudControlDeploymentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest); + + /** ListCloudControlDeploymentsRequest parent. */ + public parent: string; + + /** ListCloudControlDeploymentsRequest pageSize. */ + public pageSize: number; + + /** ListCloudControlDeploymentsRequest pageToken. */ + public pageToken: string; + + /** ListCloudControlDeploymentsRequest filter. */ + public filter: string; + + /** ListCloudControlDeploymentsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCloudControlDeploymentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCloudControlDeploymentsRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + + /** + * Encodes the specified ListCloudControlDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. + * @param message ListCloudControlDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCloudControlDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. + * @param message ListCloudControlDeploymentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCloudControlDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + + /** + * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCloudControlDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + + /** + * Verifies a ListCloudControlDeploymentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCloudControlDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCloudControlDeploymentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; + + /** + * Creates a plain object from a ListCloudControlDeploymentsRequest message. Also converts values to other types if specified. + * @param message ListCloudControlDeploymentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCloudControlDeploymentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCloudControlDeploymentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCloudControlDeploymentsResponse. */ + interface IListCloudControlDeploymentsResponse { + + /** ListCloudControlDeploymentsResponse cloudControlDeployments */ + cloudControlDeployments?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]|null); + + /** ListCloudControlDeploymentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCloudControlDeploymentsResponse. */ + class ListCloudControlDeploymentsResponse implements IListCloudControlDeploymentsResponse { + + /** + * Constructs a new ListCloudControlDeploymentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse); + + /** ListCloudControlDeploymentsResponse cloudControlDeployments. */ + public cloudControlDeployments: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]; + + /** ListCloudControlDeploymentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCloudControlDeploymentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCloudControlDeploymentsResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + + /** + * Encodes the specified ListCloudControlDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. + * @param message ListCloudControlDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCloudControlDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. + * @param message ListCloudControlDeploymentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCloudControlDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + + /** + * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCloudControlDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + + /** + * Verifies a ListCloudControlDeploymentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCloudControlDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCloudControlDeploymentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; + + /** + * Creates a plain object from a ListCloudControlDeploymentsResponse message. Also converts values to other types if specified. + * @param message ListCloudControlDeploymentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCloudControlDeploymentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCloudControlDeploymentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlDeploymentReference. */ + interface ICloudControlDeploymentReference { + + /** CloudControlDeploymentReference cloudControlDeployment */ + cloudControlDeployment?: (string|null); + } + + /** Represents a CloudControlDeploymentReference. */ + class CloudControlDeploymentReference implements ICloudControlDeploymentReference { + + /** + * Constructs a new CloudControlDeploymentReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference); + + /** CloudControlDeploymentReference cloudControlDeployment. */ + public cloudControlDeployment: string; + + /** + * Creates a new CloudControlDeploymentReference instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlDeploymentReference instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + + /** + * Encodes the specified CloudControlDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. + * @param message CloudControlDeploymentReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. + * @param message CloudControlDeploymentReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlDeploymentReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + + /** + * Decodes a CloudControlDeploymentReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + + /** + * Verifies a CloudControlDeploymentReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlDeploymentReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlDeploymentReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; + + /** + * Creates a plain object from a CloudControlDeploymentReference message. Also converts values to other types if specified. + * @param message CloudControlDeploymentReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlDeploymentReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlDeploymentReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FrameworkDeploymentReference. */ + interface IFrameworkDeploymentReference { + + /** FrameworkDeploymentReference frameworkDeployment */ + frameworkDeployment?: (string|null); + + /** FrameworkDeploymentReference frameworkReference */ + frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeploymentReference frameworkDisplayName */ + frameworkDisplayName?: (string|null); + } + + /** Represents a FrameworkDeploymentReference. */ + class FrameworkDeploymentReference implements IFrameworkDeploymentReference { + + /** + * Constructs a new FrameworkDeploymentReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference); + + /** FrameworkDeploymentReference frameworkDeployment. */ + public frameworkDeployment: string; + + /** FrameworkDeploymentReference frameworkReference. */ + public frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); + + /** FrameworkDeploymentReference frameworkDisplayName. */ + public frameworkDisplayName: string; + + /** + * Creates a new FrameworkDeploymentReference instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkDeploymentReference instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + + /** + * Encodes the specified FrameworkDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. + * @param message FrameworkDeploymentReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. + * @param message FrameworkDeploymentReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkDeploymentReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + + /** + * Decodes a FrameworkDeploymentReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + + /** + * Verifies a FrameworkDeploymentReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FrameworkDeploymentReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkDeploymentReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; + + /** + * Creates a plain object from a FrameworkDeploymentReference message. Also converts values to other types if specified. + * @param message FrameworkDeploymentReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkDeploymentReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkDeploymentReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a Monitoring */ + class Monitoring extends $protobuf.rpc.Service { + + /** + * Constructs a new Monitoring 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 Monitoring 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): Monitoring; + + /** + * Calls ListFrameworkComplianceSummaries. + * @param request ListFrameworkComplianceSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFrameworkComplianceSummariesResponse + */ + public listFrameworkComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummariesCallback): void; + + /** + * Calls ListFrameworkComplianceSummaries. + * @param request ListFrameworkComplianceSummariesRequest message or plain object + * @returns Promise + */ + public listFrameworkComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest): Promise; + + /** + * Calls ListFindingSummaries. + * @param request ListFindingSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFindingSummariesResponse + */ + public listFindingSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummariesCallback): void; + + /** + * Calls ListFindingSummaries. + * @param request ListFindingSummariesRequest message or plain object + * @returns Promise + */ + public listFindingSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest): Promise; + + /** + * Calls FetchFrameworkComplianceReport. + * @param request FetchFrameworkComplianceReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FrameworkComplianceReport + */ + public fetchFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReportCallback): void; + + /** + * Calls FetchFrameworkComplianceReport. + * @param request FetchFrameworkComplianceReportRequest message or plain object + * @returns Promise + */ + public fetchFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest): Promise; + + /** + * Calls ListControlComplianceSummaries. + * @param request ListControlComplianceSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListControlComplianceSummariesResponse + */ + public listControlComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummariesCallback): void; + + /** + * Calls ListControlComplianceSummaries. + * @param request ListControlComplianceSummariesRequest message or plain object + * @returns Promise + */ + public listControlComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest): Promise; + + /** + * Calls AggregateFrameworkComplianceReport. + * @param request AggregateFrameworkComplianceReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AggregateFrameworkComplianceReportResponse + */ + public aggregateFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReportCallback): void; + + /** + * Calls AggregateFrameworkComplianceReport. + * @param request AggregateFrameworkComplianceReportRequest message or plain object + * @returns Promise + */ + public aggregateFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest): Promise; + } + + namespace Monitoring { + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFrameworkComplianceSummaries}. + * @param error Error, if any + * @param [response] ListFrameworkComplianceSummariesResponse + */ + type ListFrameworkComplianceSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFindingSummaries}. + * @param error Error, if any + * @param [response] ListFindingSummariesResponse + */ + type ListFindingSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|fetchFrameworkComplianceReport}. + * @param error Error, if any + * @param [response] FrameworkComplianceReport + */ + type FetchFrameworkComplianceReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listControlComplianceSummaries}. + * @param error Error, if any + * @param [response] ListControlComplianceSummariesResponse + */ + type ListControlComplianceSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse) => void; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|aggregateFrameworkComplianceReport}. + * @param error Error, if any + * @param [response] AggregateFrameworkComplianceReportResponse + */ + type AggregateFrameworkComplianceReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse) => void; + } + + /** EvaluationState enum. */ + enum EvaluationState { + EVALUATION_STATE_UNSPECIFIED = 0, + EVALUATION_STATE_PASSED = 1, + EVALUATION_STATE_FAILED = 2, + EVALUATION_STATE_NOT_ASSESSED = 3 + } + + /** FindingClass enum. */ + enum FindingClass { + FINDING_CLASS_UNSPECIFIED = 0, + THREAT = 1, + VULNERABILITY = 2, + MISCONFIGURATION = 3, + OBSERVATION = 4, + SCC_ERROR = 5, + POSTURE_VIOLATION = 6, + TOXIC_COMBINATION = 7, + SENSITIVE_DATA_RISK = 8, + CHOKEPOINT = 9 + } + + /** FrameworkComplianceSummaryView enum. */ + enum FrameworkComplianceSummaryView { + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0, + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1, + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2 + } + + /** Properties of a ListFrameworkComplianceSummariesRequest. */ + interface IListFrameworkComplianceSummariesRequest { + + /** ListFrameworkComplianceSummariesRequest parent */ + parent?: (string|null); + + /** ListFrameworkComplianceSummariesRequest pageSize */ + pageSize?: (number|null); + + /** ListFrameworkComplianceSummariesRequest pageToken */ + pageToken?: (string|null); + + /** ListFrameworkComplianceSummariesRequest filter */ + filter?: (string|null); + + /** ListFrameworkComplianceSummariesRequest view */ + view?: (google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|null); + } + + /** Represents a ListFrameworkComplianceSummariesRequest. */ + class ListFrameworkComplianceSummariesRequest implements IListFrameworkComplianceSummariesRequest { + + /** + * Constructs a new ListFrameworkComplianceSummariesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest); + + /** ListFrameworkComplianceSummariesRequest parent. */ + public parent: string; + + /** ListFrameworkComplianceSummariesRequest pageSize. */ + public pageSize: number; + + /** ListFrameworkComplianceSummariesRequest pageToken. */ + public pageToken: string; + + /** ListFrameworkComplianceSummariesRequest filter. */ + public filter: string; + + /** ListFrameworkComplianceSummariesRequest view. */ + public view: (google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView); + + /** + * Creates a new ListFrameworkComplianceSummariesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworkComplianceSummariesRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; + + /** + * Encodes the specified ListFrameworkComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworkComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworkComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; + + /** + * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworkComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; + + /** + * Verifies a ListFrameworkComplianceSummariesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworkComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworkComplianceSummariesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; + + /** + * Creates a plain object from a ListFrameworkComplianceSummariesRequest message. Also converts values to other types if specified. + * @param message ListFrameworkComplianceSummariesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworkComplianceSummariesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworkComplianceSummariesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFrameworkComplianceSummariesResponse. */ + interface IListFrameworkComplianceSummariesResponse { + + /** ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries */ + frameworkComplianceSummaries?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]|null); + + /** ListFrameworkComplianceSummariesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFrameworkComplianceSummariesResponse. */ + class ListFrameworkComplianceSummariesResponse implements IListFrameworkComplianceSummariesResponse { + + /** + * Constructs a new ListFrameworkComplianceSummariesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse); + + /** ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries. */ + public frameworkComplianceSummaries: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]; + + /** ListFrameworkComplianceSummariesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFrameworkComplianceSummariesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFrameworkComplianceSummariesResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; + + /** + * Encodes the specified ListFrameworkComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFrameworkComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. + * @param message ListFrameworkComplianceSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFrameworkComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; + + /** + * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFrameworkComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; + + /** + * Verifies a ListFrameworkComplianceSummariesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFrameworkComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFrameworkComplianceSummariesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; + + /** + * Creates a plain object from a ListFrameworkComplianceSummariesResponse message. Also converts values to other types if specified. + * @param message ListFrameworkComplianceSummariesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFrameworkComplianceSummariesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFrameworkComplianceSummariesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FrameworkComplianceReport. */ + interface IFrameworkComplianceReport { + + /** FrameworkComplianceReport framework */ + framework?: (string|null); + + /** FrameworkComplianceReport frameworkDescription */ + frameworkDescription?: (string|null); + + /** FrameworkComplianceReport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkComplianceReport controlAssessmentDetails */ + controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** FrameworkComplianceReport frameworkType */ + frameworkType?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); + + /** FrameworkComplianceReport supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + + /** FrameworkComplianceReport frameworkCategories */ + frameworkCategories?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); + + /** FrameworkComplianceReport frameworkDisplayName */ + frameworkDisplayName?: (string|null); + + /** FrameworkComplianceReport name */ + name?: (string|null); + + /** FrameworkComplianceReport majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceReport minorRevisionId */ + minorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceReport targetResourceDetails */ + targetResourceDetails?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]|null); + } + + /** Represents a FrameworkComplianceReport. */ + class FrameworkComplianceReport implements IFrameworkComplianceReport { + + /** + * Constructs a new FrameworkComplianceReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport); + + /** FrameworkComplianceReport framework. */ + public framework: string; + + /** FrameworkComplianceReport frameworkDescription. */ + public frameworkDescription: string; + + /** FrameworkComplianceReport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** FrameworkComplianceReport controlAssessmentDetails. */ + public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** FrameworkComplianceReport frameworkType. */ + public frameworkType: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); + + /** FrameworkComplianceReport supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** FrameworkComplianceReport frameworkCategories. */ + public frameworkCategories: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; + + /** FrameworkComplianceReport frameworkDisplayName. */ + public frameworkDisplayName: string; + + /** FrameworkComplianceReport name. */ + public name: string; + + /** FrameworkComplianceReport majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** FrameworkComplianceReport minorRevisionId. */ + public minorRevisionId: (number|Long|string); + + /** FrameworkComplianceReport targetResourceDetails. */ + public targetResourceDetails: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]; + + /** + * Creates a new FrameworkComplianceReport instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkComplianceReport instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; + + /** + * Encodes the specified FrameworkComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. + * @param message FrameworkComplianceReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. + * @param message FrameworkComplianceReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkComplianceReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; + + /** + * Decodes a FrameworkComplianceReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; + + /** + * Verifies a FrameworkComplianceReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FrameworkComplianceReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkComplianceReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; + + /** + * Creates a plain object from a FrameworkComplianceReport message. Also converts values to other types if specified. + * @param message FrameworkComplianceReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkComplianceReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkComplianceReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchFrameworkComplianceReportRequest. */ + interface IFetchFrameworkComplianceReportRequest { + + /** FetchFrameworkComplianceReportRequest name */ + name?: (string|null); + + /** FetchFrameworkComplianceReportRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** FetchFrameworkComplianceReportRequest filter */ + filter?: (string|null); + } + + /** Represents a FetchFrameworkComplianceReportRequest. */ + class FetchFrameworkComplianceReportRequest implements IFetchFrameworkComplianceReportRequest { + + /** + * Constructs a new FetchFrameworkComplianceReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest); + + /** FetchFrameworkComplianceReportRequest name. */ + public name: string; + + /** FetchFrameworkComplianceReportRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** FetchFrameworkComplianceReportRequest filter. */ + public filter: string; + + /** + * Creates a new FetchFrameworkComplianceReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchFrameworkComplianceReportRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; + + /** + * Encodes the specified FetchFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. + * @param message FetchFrameworkComplianceReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. + * @param message FetchFrameworkComplianceReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; + + /** + * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; + + /** + * Verifies a FetchFrameworkComplianceReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchFrameworkComplianceReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; + + /** + * Creates a plain object from a FetchFrameworkComplianceReportRequest message. Also converts values to other types if specified. + * @param message FetchFrameworkComplianceReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchFrameworkComplianceReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchFrameworkComplianceReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFindingSummariesRequest. */ + interface IListFindingSummariesRequest { + + /** ListFindingSummariesRequest parent */ + parent?: (string|null); + + /** ListFindingSummariesRequest pageSize */ + pageSize?: (number|null); + + /** ListFindingSummariesRequest pageToken */ + pageToken?: (string|null); + + /** ListFindingSummariesRequest filter */ + filter?: (string|null); + + /** ListFindingSummariesRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ListFindingSummariesRequest. */ + class ListFindingSummariesRequest implements IListFindingSummariesRequest { + + /** + * Constructs a new ListFindingSummariesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest); + + /** ListFindingSummariesRequest parent. */ + public parent: string; + + /** ListFindingSummariesRequest pageSize. */ + public pageSize: number; + + /** ListFindingSummariesRequest pageToken. */ + public pageToken: string; + + /** ListFindingSummariesRequest filter. */ + public filter: string; + + /** ListFindingSummariesRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ListFindingSummariesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFindingSummariesRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; + + /** + * Encodes the specified ListFindingSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. + * @param message ListFindingSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFindingSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. + * @param message ListFindingSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFindingSummariesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFindingSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; + + /** + * Decodes a ListFindingSummariesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFindingSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; + + /** + * Verifies a ListFindingSummariesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFindingSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFindingSummariesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; + + /** + * Creates a plain object from a ListFindingSummariesRequest message. Also converts values to other types if specified. + * @param message ListFindingSummariesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFindingSummariesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFindingSummariesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFindingSummariesResponse. */ + interface IListFindingSummariesResponse { + + /** ListFindingSummariesResponse findingSummaries */ + findingSummaries?: (google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]|null); + + /** ListFindingSummariesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFindingSummariesResponse. */ + class ListFindingSummariesResponse implements IListFindingSummariesResponse { + + /** + * Constructs a new ListFindingSummariesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse); + + /** ListFindingSummariesResponse findingSummaries. */ + public findingSummaries: google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]; + + /** ListFindingSummariesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFindingSummariesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFindingSummariesResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; + + /** + * Encodes the specified ListFindingSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. + * @param message ListFindingSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFindingSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. + * @param message ListFindingSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFindingSummariesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFindingSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; + + /** + * Decodes a ListFindingSummariesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFindingSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; + + /** + * Verifies a ListFindingSummariesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFindingSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFindingSummariesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; + + /** + * Creates a plain object from a ListFindingSummariesResponse message. Also converts values to other types if specified. + * @param message ListFindingSummariesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFindingSummariesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFindingSummariesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListControlComplianceSummariesRequest. */ + interface IListControlComplianceSummariesRequest { + + /** ListControlComplianceSummariesRequest parent */ + parent?: (string|null); + + /** ListControlComplianceSummariesRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** ListControlComplianceSummariesRequest pageSize */ + pageSize?: (number|null); + + /** ListControlComplianceSummariesRequest pageToken */ + pageToken?: (string|null); + + /** ListControlComplianceSummariesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListControlComplianceSummariesRequest. */ + class ListControlComplianceSummariesRequest implements IListControlComplianceSummariesRequest { + + /** + * Constructs a new ListControlComplianceSummariesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest); + + /** ListControlComplianceSummariesRequest parent. */ + public parent: string; + + /** ListControlComplianceSummariesRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** ListControlComplianceSummariesRequest pageSize. */ + public pageSize: number; + + /** ListControlComplianceSummariesRequest pageToken. */ + public pageToken: string; + + /** ListControlComplianceSummariesRequest filter. */ + public filter: string; + + /** + * Creates a new ListControlComplianceSummariesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListControlComplianceSummariesRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; + + /** + * Encodes the specified ListControlComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. + * @param message ListControlComplianceSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListControlComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. + * @param message ListControlComplianceSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListControlComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; + + /** + * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListControlComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; + + /** + * Verifies a ListControlComplianceSummariesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListControlComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListControlComplianceSummariesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; + + /** + * Creates a plain object from a ListControlComplianceSummariesRequest message. Also converts values to other types if specified. + * @param message ListControlComplianceSummariesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListControlComplianceSummariesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListControlComplianceSummariesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListControlComplianceSummariesResponse. */ + interface IListControlComplianceSummariesResponse { + + /** ListControlComplianceSummariesResponse controlComplianceSummaries */ + controlComplianceSummaries?: (google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]|null); + + /** ListControlComplianceSummariesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListControlComplianceSummariesResponse. */ + class ListControlComplianceSummariesResponse implements IListControlComplianceSummariesResponse { + + /** + * Constructs a new ListControlComplianceSummariesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse); + + /** ListControlComplianceSummariesResponse controlComplianceSummaries. */ + public controlComplianceSummaries: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]; + + /** ListControlComplianceSummariesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListControlComplianceSummariesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListControlComplianceSummariesResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; + + /** + * Encodes the specified ListControlComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. + * @param message ListControlComplianceSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListControlComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. + * @param message ListControlComplianceSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListControlComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; + + /** + * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListControlComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; + + /** + * Verifies a ListControlComplianceSummariesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListControlComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListControlComplianceSummariesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; + + /** + * Creates a plain object from a ListControlComplianceSummariesResponse message. Also converts values to other types if specified. + * @param message ListControlComplianceSummariesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListControlComplianceSummariesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListControlComplianceSummariesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AggregateFrameworkComplianceReportRequest. */ + interface IAggregateFrameworkComplianceReportRequest { + + /** AggregateFrameworkComplianceReportRequest name */ + name?: (string|null); + + /** AggregateFrameworkComplianceReportRequest interval */ + interval?: (google.type.IInterval|null); + + /** AggregateFrameworkComplianceReportRequest filter */ + filter?: (string|null); + } + + /** Represents an AggregateFrameworkComplianceReportRequest. */ + class AggregateFrameworkComplianceReportRequest implements IAggregateFrameworkComplianceReportRequest { + + /** + * Constructs a new AggregateFrameworkComplianceReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest); + + /** AggregateFrameworkComplianceReportRequest name. */ + public name: string; + + /** AggregateFrameworkComplianceReportRequest interval. */ + public interval?: (google.type.IInterval|null); + + /** AggregateFrameworkComplianceReportRequest filter. */ + public filter: string; + + /** + * Creates a new AggregateFrameworkComplianceReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregateFrameworkComplianceReportRequest instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; + + /** + * Encodes the specified AggregateFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AggregateFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregateFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; + + /** + * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregateFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; + + /** + * Verifies an AggregateFrameworkComplianceReportRequest message. + * @param message Plain 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 AggregateFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregateFrameworkComplianceReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; + + /** + * Creates a plain object from an AggregateFrameworkComplianceReportRequest message. Also converts values to other types if specified. + * @param message AggregateFrameworkComplianceReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregateFrameworkComplianceReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregateFrameworkComplianceReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AggregateFrameworkComplianceReportResponse. */ + interface IAggregateFrameworkComplianceReportResponse { + + /** AggregateFrameworkComplianceReportResponse aggregatedComplianceReports */ + aggregatedComplianceReports?: (google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport[]|null); + } + + /** Represents an AggregateFrameworkComplianceReportResponse. */ + class AggregateFrameworkComplianceReportResponse implements IAggregateFrameworkComplianceReportResponse { + + /** + * Constructs a new AggregateFrameworkComplianceReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse); + + /** AggregateFrameworkComplianceReportResponse aggregatedComplianceReports. */ + public aggregatedComplianceReports: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport[]; + + /** + * Creates a new AggregateFrameworkComplianceReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregateFrameworkComplianceReportResponse instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; + + /** + * Encodes the specified AggregateFrameworkComplianceReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AggregateFrameworkComplianceReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. + * @param message AggregateFrameworkComplianceReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregateFrameworkComplianceReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; + + /** + * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregateFrameworkComplianceReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; + + /** + * Verifies an AggregateFrameworkComplianceReportResponse message. + * @param message Plain 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 AggregateFrameworkComplianceReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregateFrameworkComplianceReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; + + /** + * Creates a plain object from an AggregateFrameworkComplianceReportResponse message. Also converts values to other types if specified. + * @param message AggregateFrameworkComplianceReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregateFrameworkComplianceReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregateFrameworkComplianceReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ControlAssessmentDetails. */ + interface IControlAssessmentDetails { + + /** ControlAssessmentDetails passingControls */ + passingControls?: (number|null); + + /** ControlAssessmentDetails failingControls */ + failingControls?: (number|null); + + /** ControlAssessmentDetails assessedPassingControls */ + assessedPassingControls?: (number|null); + + /** ControlAssessmentDetails notAssessedControls */ + notAssessedControls?: (number|null); + } + + /** Represents a ControlAssessmentDetails. */ + class ControlAssessmentDetails implements IControlAssessmentDetails { + + /** + * Constructs a new ControlAssessmentDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails); + + /** ControlAssessmentDetails passingControls. */ + public passingControls: number; + + /** ControlAssessmentDetails failingControls. */ + public failingControls: number; + + /** ControlAssessmentDetails assessedPassingControls. */ + public assessedPassingControls: number; + + /** ControlAssessmentDetails notAssessedControls. */ + public notAssessedControls: number; + + /** + * Creates a new ControlAssessmentDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ControlAssessmentDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; + + /** + * Encodes the specified ControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. + * @param message ControlAssessmentDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. + * @param message ControlAssessmentDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ControlAssessmentDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; + + /** + * Decodes a ControlAssessmentDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; + + /** + * Verifies a ControlAssessmentDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ControlAssessmentDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; + + /** + * Creates a plain object from a ControlAssessmentDetails message. Also converts values to other types if specified. + * @param message ControlAssessmentDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ControlAssessmentDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ControlAssessmentDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FrameworkComplianceSummary. */ + interface IFrameworkComplianceSummary { + + /** FrameworkComplianceSummary framework */ + framework?: (string|null); + + /** FrameworkComplianceSummary controlAssessmentDetails */ + controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** FrameworkComplianceSummary frameworkType */ + frameworkType?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); + + /** FrameworkComplianceSummary supportedCloudProviders */ + supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); + + /** FrameworkComplianceSummary frameworkCategories */ + frameworkCategories?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); + + /** FrameworkComplianceSummary frameworkDisplayName */ + frameworkDisplayName?: (string|null); + + /** FrameworkComplianceSummary name */ + name?: (string|null); + + /** FrameworkComplianceSummary majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceSummary minorRevisionId */ + minorRevisionId?: (number|Long|string|null); + + /** FrameworkComplianceSummary targetResourceDetails */ + targetResourceDetails?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]|null); + + /** FrameworkComplianceSummary findingCount */ + findingCount?: (number|Long|string|null); + + /** FrameworkComplianceSummary controlsPassingTrend */ + controlsPassingTrend?: (google.cloud.cloudsecuritycompliance.v1.ITrend|null); + } + + /** Represents a FrameworkComplianceSummary. */ + class FrameworkComplianceSummary implements IFrameworkComplianceSummary { + + /** + * Constructs a new FrameworkComplianceSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary); + + /** FrameworkComplianceSummary framework. */ + public framework: string; + + /** FrameworkComplianceSummary controlAssessmentDetails. */ + public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** FrameworkComplianceSummary frameworkType. */ + public frameworkType: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); + + /** FrameworkComplianceSummary supportedCloudProviders. */ + public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; + + /** FrameworkComplianceSummary frameworkCategories. */ + public frameworkCategories: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; + + /** FrameworkComplianceSummary frameworkDisplayName. */ + public frameworkDisplayName: string; + + /** FrameworkComplianceSummary name. */ + public name: string; + + /** FrameworkComplianceSummary majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** FrameworkComplianceSummary minorRevisionId. */ + public minorRevisionId: (number|Long|string); + + /** FrameworkComplianceSummary targetResourceDetails. */ + public targetResourceDetails: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]; + + /** FrameworkComplianceSummary findingCount. */ + public findingCount: (number|Long|string); + + /** FrameworkComplianceSummary controlsPassingTrend. */ + public controlsPassingTrend?: (google.cloud.cloudsecuritycompliance.v1.ITrend|null); + + /** + * Creates a new FrameworkComplianceSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns FrameworkComplianceSummary instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; + + /** + * Encodes the specified FrameworkComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. + * @param message FrameworkComplianceSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrameworkComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. + * @param message FrameworkComplianceSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrameworkComplianceSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrameworkComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; + + /** + * Decodes a FrameworkComplianceSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrameworkComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; + + /** + * Verifies a FrameworkComplianceSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FrameworkComplianceSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrameworkComplianceSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; + + /** + * Creates a plain object from a FrameworkComplianceSummary message. Also converts values to other types if specified. + * @param message FrameworkComplianceSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrameworkComplianceSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrameworkComplianceSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FindingSummary. */ + interface IFindingSummary { + + /** FindingSummary findingCategory */ + findingCategory?: (string|null); + + /** FindingSummary findingClass */ + findingClass?: (google.cloud.cloudsecuritycompliance.v1.FindingClass|keyof typeof google.cloud.cloudsecuritycompliance.v1.FindingClass|null); + + /** FindingSummary severity */ + severity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); + + /** FindingSummary findingCount */ + findingCount?: (number|Long|string|null); + + /** FindingSummary updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** FindingSummary relatedFrameworks */ + relatedFrameworks?: (string[]|null); + + /** FindingSummary name */ + name?: (string|null); + } + + /** Represents a FindingSummary. */ + class FindingSummary implements IFindingSummary { + + /** + * Constructs a new FindingSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingSummary); + + /** FindingSummary findingCategory. */ + public findingCategory: string; + + /** FindingSummary findingClass. */ + public findingClass: (google.cloud.cloudsecuritycompliance.v1.FindingClass|keyof typeof google.cloud.cloudsecuritycompliance.v1.FindingClass); + + /** FindingSummary severity. */ + public severity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); + + /** FindingSummary findingCount. */ + public findingCount: (number|Long|string); + + /** FindingSummary updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** FindingSummary relatedFrameworks. */ + public relatedFrameworks: string[]; + + /** FindingSummary name. */ + public name: string; + + /** + * Creates a new FindingSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns FindingSummary instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingSummary): google.cloud.cloudsecuritycompliance.v1.FindingSummary; + + /** + * Encodes the specified FindingSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. + * @param message FindingSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FindingSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. + * @param message FindingSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FindingSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FindingSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FindingSummary; + + /** + * Decodes a FindingSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FindingSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FindingSummary; + + /** + * Verifies a FindingSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FindingSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FindingSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FindingSummary; + + /** + * Creates a plain object from a FindingSummary message. Also converts values to other types if specified. + * @param message FindingSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FindingSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FindingSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FindingSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ControlComplianceSummary. */ + interface IControlComplianceSummary { + + /** ControlComplianceSummary control */ + control?: (string|null); + + /** ControlComplianceSummary displayName */ + displayName?: (string|null); + + /** ControlComplianceSummary description */ + description?: (string|null); + + /** ControlComplianceSummary overallEvaluationState */ + overallEvaluationState?: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState|null); + + /** ControlComplianceSummary totalFindingsCount */ + totalFindingsCount?: (number|null); + + /** ControlComplianceSummary complianceFrameworks */ + complianceFrameworks?: (string[]|null); + + /** ControlComplianceSummary similarControls */ + similarControls?: (google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]|null); + + /** ControlComplianceSummary cloudControlReports */ + cloudControlReports?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlReport[]|null); + + /** ControlComplianceSummary controlResponsibilityType */ + controlResponsibilityType?: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null); + + /** ControlComplianceSummary isFakeControl */ + isFakeControl?: (boolean|null); + + /** ControlComplianceSummary name */ + name?: (string|null); + } + + /** Represents a ControlComplianceSummary. */ + class ControlComplianceSummary implements IControlComplianceSummary { + + /** + * Constructs a new ControlComplianceSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary); + + /** ControlComplianceSummary control. */ + public control: string; + + /** ControlComplianceSummary displayName. */ + public displayName: string; + + /** ControlComplianceSummary description. */ + public description: string; + + /** ControlComplianceSummary overallEvaluationState. */ + public overallEvaluationState: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState); + + /** ControlComplianceSummary totalFindingsCount. */ + public totalFindingsCount: number; + + /** ControlComplianceSummary complianceFrameworks. */ + public complianceFrameworks: string[]; + + /** ControlComplianceSummary similarControls. */ + public similarControls: google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]; + + /** ControlComplianceSummary cloudControlReports. */ + public cloudControlReports: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport[]; + + /** ControlComplianceSummary controlResponsibilityType. */ + public controlResponsibilityType: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType); + + /** ControlComplianceSummary isFakeControl. */ + public isFakeControl: boolean; + + /** ControlComplianceSummary name. */ + public name: string; + + /** + * Creates a new ControlComplianceSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns ControlComplianceSummary instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; + + /** + * Encodes the specified ControlComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. + * @param message ControlComplianceSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ControlComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. + * @param message ControlComplianceSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ControlComplianceSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ControlComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; + + /** + * Decodes a ControlComplianceSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ControlComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; + + /** + * Verifies a ControlComplianceSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ControlComplianceSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ControlComplianceSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; + + /** + * Creates a plain object from a ControlComplianceSummary message. Also converts values to other types if specified. + * @param message ControlComplianceSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ControlComplianceSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ControlComplianceSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlReport. */ + interface ICloudControlReport { + + /** CloudControlReport manualCloudControlAssessmentDetails */ + manualCloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null); + + /** CloudControlReport cloudControlAssessmentDetails */ + cloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null); + + /** CloudControlReport cloudControl */ + cloudControl?: (string|null); + + /** CloudControlReport displayName */ + displayName?: (string|null); + + /** CloudControlReport description */ + description?: (string|null); + + /** CloudControlReport categories */ + categories?: (string[]|null); + + /** CloudControlReport similarControls */ + similarControls?: (google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]|null); + + /** CloudControlReport cloudControlType */ + cloudControlType?: (google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|keyof typeof google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|null); + + /** CloudControlReport findingCategory */ + findingCategory?: (string|null); + + /** CloudControlReport rules */ + rules?: (google.cloud.cloudsecuritycompliance.v1.IRule[]|null); + + /** CloudControlReport findingSeverity */ + findingSeverity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); + + /** CloudControlReport enforcementMode */ + enforcementMode?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null); + + /** CloudControlReport cloudControlDeployment */ + cloudControlDeployment?: (string|null); + + /** CloudControlReport majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** CloudControlReport minorRevisionId */ + minorRevisionId?: (number|Long|string|null); + + /** CloudControlReport frameworkMajorRevisionIds */ + frameworkMajorRevisionIds?: ((number|Long|string)[]|null); + } + + /** Represents a CloudControlReport. */ + class CloudControlReport implements ICloudControlReport { + + /** + * Constructs a new CloudControlReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport); + + /** CloudControlReport manualCloudControlAssessmentDetails. */ + public manualCloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null); + + /** CloudControlReport cloudControlAssessmentDetails. */ + public cloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null); + + /** CloudControlReport cloudControl. */ + public cloudControl: string; + + /** CloudControlReport displayName. */ + public displayName: string; + + /** CloudControlReport description. */ + public description: string; + + /** CloudControlReport categories. */ + public categories: string[]; + + /** CloudControlReport similarControls. */ + public similarControls: google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]; + + /** CloudControlReport cloudControlType. */ + public cloudControlType: (google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|keyof typeof google.cloud.cloudsecuritycompliance.v1.CloudControl.Type); + + /** CloudControlReport findingCategory. */ + public findingCategory: string; + + /** CloudControlReport rules. */ + public rules: google.cloud.cloudsecuritycompliance.v1.IRule[]; + + /** CloudControlReport findingSeverity. */ + public findingSeverity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); + + /** CloudControlReport enforcementMode. */ + public enforcementMode: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode); + + /** CloudControlReport cloudControlDeployment. */ + public cloudControlDeployment: string; + + /** CloudControlReport majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** CloudControlReport minorRevisionId. */ + public minorRevisionId: (number|Long|string); + + /** CloudControlReport frameworkMajorRevisionIds. */ + public frameworkMajorRevisionIds: (number|Long|string)[]; + + /** CloudControlReport assessmentDetails. */ + public assessmentDetails?: ("manualCloudControlAssessmentDetails"|"cloudControlAssessmentDetails"); + + /** + * Creates a new CloudControlReport instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlReport instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; + + /** + * Encodes the specified CloudControlReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. + * @param message CloudControlReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. + * @param message CloudControlReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; + + /** + * Decodes a CloudControlReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; + + /** + * Verifies a CloudControlReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; + + /** + * Creates a plain object from a CloudControlReport message. Also converts values to other types if specified. + * @param message CloudControlReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ManualCloudControlAssessmentDetails. */ + interface IManualCloudControlAssessmentDetails { + + /** ManualCloudControlAssessmentDetails manualCloudControlGuide */ + manualCloudControlGuide?: (string[]|null); + } + + /** Represents a ManualCloudControlAssessmentDetails. */ + class ManualCloudControlAssessmentDetails implements IManualCloudControlAssessmentDetails { + + /** + * Constructs a new ManualCloudControlAssessmentDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails); + + /** ManualCloudControlAssessmentDetails manualCloudControlGuide. */ + public manualCloudControlGuide: string[]; + + /** + * Creates a new ManualCloudControlAssessmentDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ManualCloudControlAssessmentDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; + + /** + * Encodes the specified ManualCloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. + * @param message ManualCloudControlAssessmentDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManualCloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. + * @param message ManualCloudControlAssessmentDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManualCloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; + + /** + * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManualCloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; + + /** + * Verifies a ManualCloudControlAssessmentDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManualCloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManualCloudControlAssessmentDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; + + /** + * Creates a plain object from a ManualCloudControlAssessmentDetails message. Also converts values to other types if specified. + * @param message ManualCloudControlAssessmentDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManualCloudControlAssessmentDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManualCloudControlAssessmentDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudControlAssessmentDetails. */ + interface ICloudControlAssessmentDetails { + + /** CloudControlAssessmentDetails findingsCount */ + findingsCount?: (number|null); + + /** CloudControlAssessmentDetails evaluationState */ + evaluationState?: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState|null); + } + + /** Represents a CloudControlAssessmentDetails. */ + class CloudControlAssessmentDetails implements ICloudControlAssessmentDetails { + + /** + * Constructs a new CloudControlAssessmentDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails); + + /** CloudControlAssessmentDetails findingsCount. */ + public findingsCount: number; + + /** CloudControlAssessmentDetails evaluationState. */ + public evaluationState: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState); + + /** + * Creates a new CloudControlAssessmentDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudControlAssessmentDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; + + /** + * Encodes the specified CloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. + * @param message CloudControlAssessmentDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. + * @param message CloudControlAssessmentDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; + + /** + * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; + + /** + * Verifies a CloudControlAssessmentDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudControlAssessmentDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; + + /** + * Creates a plain object from a CloudControlAssessmentDetails message. Also converts values to other types if specified. + * @param message CloudControlAssessmentDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudControlAssessmentDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudControlAssessmentDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SimilarControls. */ + interface ISimilarControls { + + /** SimilarControls framework */ + framework?: (string|null); + + /** SimilarControls controlId */ + controlId?: (string|null); + } + + /** Represents a SimilarControls. */ + class SimilarControls implements ISimilarControls { + + /** + * Constructs a new SimilarControls. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ISimilarControls); + + /** SimilarControls framework. */ + public framework: string; + + /** SimilarControls controlId. */ + public controlId: string; + + /** + * Creates a new SimilarControls instance using the specified properties. + * @param [properties] Properties to set + * @returns SimilarControls instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ISimilarControls): google.cloud.cloudsecuritycompliance.v1.SimilarControls; + + /** + * Encodes the specified SimilarControls message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. + * @param message SimilarControls message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ISimilarControls, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimilarControls message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. + * @param message SimilarControls message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ISimilarControls, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimilarControls message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimilarControls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.SimilarControls; + + /** + * Decodes a SimilarControls message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimilarControls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.SimilarControls; + + /** + * Verifies a SimilarControls message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimilarControls message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimilarControls + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.SimilarControls; + + /** + * Creates a plain object from a SimilarControls message. Also converts values to other types if specified. + * @param message SimilarControls + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.SimilarControls, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimilarControls to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimilarControls + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AggregatedComplianceReport. */ + interface IAggregatedComplianceReport { + + /** AggregatedComplianceReport controlAssessmentDetails */ + controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** AggregatedComplianceReport reportTime */ + reportTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an AggregatedComplianceReport. */ + class AggregatedComplianceReport implements IAggregatedComplianceReport { + + /** + * Constructs a new AggregatedComplianceReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport); + + /** AggregatedComplianceReport controlAssessmentDetails. */ + public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); + + /** AggregatedComplianceReport reportTime. */ + public reportTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new AggregatedComplianceReport instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregatedComplianceReport instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; + + /** + * Encodes the specified AggregatedComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. + * @param message AggregatedComplianceReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AggregatedComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. + * @param message AggregatedComplianceReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AggregatedComplianceReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregatedComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; + + /** + * Decodes an AggregatedComplianceReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregatedComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; + + /** + * Verifies an AggregatedComplianceReport message. + * @param message Plain 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 AggregatedComplianceReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregatedComplianceReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; + + /** + * Creates a plain object from an AggregatedComplianceReport message. Also converts values to other types if specified. + * @param message AggregatedComplianceReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregatedComplianceReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregatedComplianceReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResourceDetails. */ + interface ITargetResourceDetails { + + /** TargetResourceDetails frameworkDeployment */ + frameworkDeployment?: (string|null); + + /** TargetResourceDetails targetResourceDisplayName */ + targetResourceDisplayName?: (string|null); + + /** TargetResourceDetails targetResource */ + targetResource?: (string|null); + + /** TargetResourceDetails createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails majorRevisionId */ + majorRevisionId?: (number|Long|string|null); + + /** TargetResourceDetails minorRevisionId */ + minorRevisionId?: (number|Long|string|null); + } + + /** Represents a TargetResourceDetails. */ + class TargetResourceDetails implements ITargetResourceDetails { + + /** + * Constructs a new TargetResourceDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails); + + /** TargetResourceDetails frameworkDeployment. */ + public frameworkDeployment: string; + + /** TargetResourceDetails targetResourceDisplayName. */ + public targetResourceDisplayName: string; + + /** TargetResourceDetails targetResource. */ + public targetResource: string; + + /** TargetResourceDetails createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** TargetResourceDetails majorRevisionId. */ + public majorRevisionId: (number|Long|string); + + /** TargetResourceDetails minorRevisionId. */ + public minorRevisionId: (number|Long|string); + + /** + * Creates a new TargetResourceDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResourceDetails instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; + + /** + * Encodes the specified TargetResourceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. + * @param message TargetResourceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResourceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. + * @param message TargetResourceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResourceDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; + + /** + * Decodes a TargetResourceDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; + + /** + * Verifies a TargetResourceDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResourceDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResourceDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; + + /** + * Creates a plain object from a TargetResourceDetails message. Also converts values to other types if specified. + * @param message TargetResourceDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResourceDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResourceDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Trend. */ + interface ITrend { + + /** Trend duration */ + duration?: (google.protobuf.IDuration|null); + + /** Trend valuePercent */ + valuePercent?: (number|null); + } + + /** Represents a Trend. */ + class Trend implements ITrend { + + /** + * Constructs a new Trend. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITrend); + + /** Trend duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** Trend valuePercent. */ + public valuePercent: number; + + /** + * Creates a new Trend instance using the specified properties. + * @param [properties] Properties to set + * @returns Trend instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITrend): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Encodes the specified Trend message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @param message Trend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITrend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trend message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @param message Trend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITrend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Decodes a Trend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Verifies a Trend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trend + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Creates a plain object from a Trend message. Also converts values to other types if specified. + * @param message Trend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Trend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trend + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not 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.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload 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.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not 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.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload 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.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not 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.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload 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.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not 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.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload 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.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not 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.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload 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.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not 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.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload 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.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not 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.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload 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.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not 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.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload 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.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not 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.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload 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.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not 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.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload 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.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not 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.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload 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.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not 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.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload 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.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not 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.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload 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.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** 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, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not 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.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload 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.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions 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 features */ + features?: (google.protobuf.IFeatureSet|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 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 features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|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 deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not 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.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload 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.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** 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 features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|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 deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (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 features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** 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); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|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 features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|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|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not 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.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload 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.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not 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.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload 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.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not 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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload 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.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|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|Buffer|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 }; + + /** + * 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. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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. */ + 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 }; + + /** + * 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; + } + } + + /** 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 }; + + /** + * 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; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.type.IInterval): google.type.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Interval; + + /** + * Verifies an Interval message. + * @param message Plain 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.type.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js new file mode 100644 index 00000000000..e0d9a03dc52 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js @@ -0,0 +1,51390 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_cloudsecuritycompliance_protos || ($protobuf.roots._google_cloud_cloudsecuritycompliance_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.cloudsecuritycompliance = (function() { + + /** + * Namespace cloudsecuritycompliance. + * @memberof google.cloud + * @namespace + */ + var cloudsecuritycompliance = {}; + + cloudsecuritycompliance.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.cloudsecuritycompliance + * @namespace + */ + var v1 = {}; + + v1.Audit = (function() { + + /** + * Constructs a new Audit service. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an Audit + * @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 Audit(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Audit.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Audit; + + /** + * Creates new Audit service using the specified rpc implementation. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @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 {Audit} RPC service. Useful where requests and/or responses are streamed. + */ + Audit.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|generateFrameworkAuditScopeReport}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @typedef GenerateFrameworkAuditScopeReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} [response] GenerateFrameworkAuditScopeReportResponse + */ + + /** + * Calls GenerateFrameworkAuditScopeReport. + * @function generateFrameworkAuditScopeReport + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} request GenerateFrameworkAuditScopeReportRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReportCallback} callback Node-style callback called with the error, if any, and GenerateFrameworkAuditScopeReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Audit.prototype.generateFrameworkAuditScopeReport = function generateFrameworkAuditScopeReport(request, callback) { + return this.rpcCall(generateFrameworkAuditScopeReport, $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest, $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse, request, callback); + }, "name", { value: "GenerateFrameworkAuditScopeReport" }); + + /** + * Calls GenerateFrameworkAuditScopeReport. + * @function generateFrameworkAuditScopeReport + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} request GenerateFrameworkAuditScopeReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|createFrameworkAudit}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @typedef CreateFrameworkAuditCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateFrameworkAudit. + * @function createFrameworkAudit + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} request CreateFrameworkAuditRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAuditCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Audit.prototype.createFrameworkAudit = function createFrameworkAudit(request, callback) { + return this.rpcCall(createFrameworkAudit, $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateFrameworkAudit" }); + + /** + * Calls CreateFrameworkAudit. + * @function createFrameworkAudit + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} request CreateFrameworkAuditRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|listFrameworkAudits}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @typedef ListFrameworkAuditsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} [response] ListFrameworkAuditsResponse + */ + + /** + * Calls ListFrameworkAudits. + * @function listFrameworkAudits + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} request ListFrameworkAuditsRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAuditsCallback} callback Node-style callback called with the error, if any, and ListFrameworkAuditsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Audit.prototype.listFrameworkAudits = function listFrameworkAudits(request, callback) { + return this.rpcCall(listFrameworkAudits, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse, request, callback); + }, "name", { value: "ListFrameworkAudits" }); + + /** + * Calls ListFrameworkAudits. + * @function listFrameworkAudits + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} request ListFrameworkAuditsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|getFrameworkAudit}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @typedef GetFrameworkAuditCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} [response] FrameworkAudit + */ + + /** + * Calls GetFrameworkAudit. + * @function getFrameworkAudit + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} request GetFrameworkAuditRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAuditCallback} callback Node-style callback called with the error, if any, and FrameworkAudit + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Audit.prototype.getFrameworkAudit = function getFrameworkAudit(request, callback) { + return this.rpcCall(getFrameworkAudit, $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest, $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit, request, callback); + }, "name", { value: "GetFrameworkAudit" }); + + /** + * Calls GetFrameworkAudit. + * @function getFrameworkAudit + * @memberof google.cloud.cloudsecuritycompliance.v1.Audit + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} request GetFrameworkAuditRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Audit; + })(); + + /** + * ComplianceState enum. + * @name google.cloud.cloudsecuritycompliance.v1.ComplianceState + * @enum {number} + * @property {number} COMPLIANCE_STATE_UNSPECIFIED=0 COMPLIANCE_STATE_UNSPECIFIED value + * @property {number} COMPLIANT=1 COMPLIANT value + * @property {number} VIOLATION=2 VIOLATION value + * @property {number} MANUAL_REVIEW_NEEDED=3 MANUAL_REVIEW_NEEDED value + * @property {number} ERROR=4 ERROR value + * @property {number} AUDIT_NOT_SUPPORTED=5 AUDIT_NOT_SUPPORTED value + */ + v1.ComplianceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPLIANCE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPLIANT"] = 1; + values[valuesById[2] = "VIOLATION"] = 2; + values[valuesById[3] = "MANUAL_REVIEW_NEEDED"] = 3; + values[valuesById[4] = "ERROR"] = 4; + values[valuesById[5] = "AUDIT_NOT_SUPPORTED"] = 5; + return values; + })(); + + v1.GenerateFrameworkAuditScopeReportRequest = (function() { + + /** + * Properties of a GenerateFrameworkAuditScopeReportRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IGenerateFrameworkAuditScopeReportRequest + * @property {string|null} [scope] GenerateFrameworkAuditScopeReportRequest scope + * @property {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|null} [reportFormat] GenerateFrameworkAuditScopeReportRequest reportFormat + * @property {string|null} [complianceFramework] GenerateFrameworkAuditScopeReportRequest complianceFramework + */ + + /** + * Constructs a new GenerateFrameworkAuditScopeReportRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a GenerateFrameworkAuditScopeReportRequest. + * @implements IGenerateFrameworkAuditScopeReportRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest=} [properties] Properties to set + */ + function GenerateFrameworkAuditScopeReportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateFrameworkAuditScopeReportRequest scope. + * @member {string} scope + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @instance + */ + GenerateFrameworkAuditScopeReportRequest.prototype.scope = ""; + + /** + * GenerateFrameworkAuditScopeReportRequest reportFormat. + * @member {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format} reportFormat + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @instance + */ + GenerateFrameworkAuditScopeReportRequest.prototype.reportFormat = 0; + + /** + * GenerateFrameworkAuditScopeReportRequest complianceFramework. + * @member {string} complianceFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @instance + */ + GenerateFrameworkAuditScopeReportRequest.prototype.complianceFramework = ""; + + /** + * Creates a new GenerateFrameworkAuditScopeReportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest instance + */ + GenerateFrameworkAuditScopeReportRequest.create = function create(properties) { + return new GenerateFrameworkAuditScopeReportRequest(properties); + }; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} message GenerateFrameworkAuditScopeReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateFrameworkAuditScopeReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.scope); + if (message.reportFormat != null && Object.hasOwnProperty.call(message, "reportFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reportFormat); + if (message.complianceFramework != null && Object.hasOwnProperty.call(message, "complianceFramework")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.complianceFramework); + return writer; + }; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} message GenerateFrameworkAuditScopeReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateFrameworkAuditScopeReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateFrameworkAuditScopeReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.scope = reader.string(); + break; + } + case 2: { + message.reportFormat = reader.int32(); + break; + } + case 3: { + message.complianceFramework = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateFrameworkAuditScopeReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateFrameworkAuditScopeReportRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateFrameworkAuditScopeReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + if (message.reportFormat != null && message.hasOwnProperty("reportFormat")) + switch (message.reportFormat) { + default: + return "reportFormat: enum value expected"; + case 0: + case 1: + break; + } + if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) + if (!$util.isString(message.complianceFramework)) + return "complianceFramework: string expected"; + return null; + }; + + /** + * Creates a GenerateFrameworkAuditScopeReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest + */ + GenerateFrameworkAuditScopeReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest(); + if (object.scope != null) + message.scope = String(object.scope); + switch (object.reportFormat) { + default: + if (typeof object.reportFormat === "number") { + message.reportFormat = object.reportFormat; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.reportFormat = 0; + break; + case "ODF": + case 1: + message.reportFormat = 1; + break; + } + if (object.complianceFramework != null) + message.complianceFramework = String(object.complianceFramework); + return message; + }; + + /** + * Creates a plain object from a GenerateFrameworkAuditScopeReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} message GenerateFrameworkAuditScopeReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateFrameworkAuditScopeReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scope = ""; + object.reportFormat = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.complianceFramework = ""; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; + if (message.reportFormat != null && message.hasOwnProperty("reportFormat")) + object.reportFormat = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format[message.reportFormat] === undefined ? message.reportFormat : $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format[message.reportFormat] : message.reportFormat; + if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) + object.complianceFramework = message.complianceFramework; + return object; + }; + + /** + * Converts this GenerateFrameworkAuditScopeReportRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateFrameworkAuditScopeReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateFrameworkAuditScopeReportRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateFrameworkAuditScopeReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest"; + }; + + /** + * Format enum. + * @name google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} ODF=1 ODF value + */ + GenerateFrameworkAuditScopeReportRequest.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "ODF"] = 1; + return values; + })(); + + return GenerateFrameworkAuditScopeReportRequest; + })(); + + v1.GenerateFrameworkAuditScopeReportResponse = (function() { + + /** + * Properties of a GenerateFrameworkAuditScopeReportResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IGenerateFrameworkAuditScopeReportResponse + * @property {Uint8Array|null} [scopeReportContents] GenerateFrameworkAuditScopeReportResponse scopeReportContents + * @property {string|null} [name] GenerateFrameworkAuditScopeReportResponse name + * @property {string|null} [complianceFramework] GenerateFrameworkAuditScopeReportResponse complianceFramework + */ + + /** + * Constructs a new GenerateFrameworkAuditScopeReportResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a GenerateFrameworkAuditScopeReportResponse. + * @implements IGenerateFrameworkAuditScopeReportResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse=} [properties] Properties to set + */ + function GenerateFrameworkAuditScopeReportResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateFrameworkAuditScopeReportResponse scopeReportContents. + * @member {Uint8Array|null|undefined} scopeReportContents + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @instance + */ + GenerateFrameworkAuditScopeReportResponse.prototype.scopeReportContents = null; + + /** + * GenerateFrameworkAuditScopeReportResponse name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @instance + */ + GenerateFrameworkAuditScopeReportResponse.prototype.name = ""; + + /** + * GenerateFrameworkAuditScopeReportResponse complianceFramework. + * @member {string} complianceFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @instance + */ + GenerateFrameworkAuditScopeReportResponse.prototype.complianceFramework = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GenerateFrameworkAuditScopeReportResponse auditReport. + * @member {"scopeReportContents"|undefined} auditReport + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @instance + */ + Object.defineProperty(GenerateFrameworkAuditScopeReportResponse.prototype, "auditReport", { + get: $util.oneOfGetter($oneOfFields = ["scopeReportContents"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GenerateFrameworkAuditScopeReportResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse instance + */ + GenerateFrameworkAuditScopeReportResponse.create = function create(properties) { + return new GenerateFrameworkAuditScopeReportResponse(properties); + }; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse} message GenerateFrameworkAuditScopeReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateFrameworkAuditScopeReportResponse.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.complianceFramework != null && Object.hasOwnProperty.call(message, "complianceFramework")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.complianceFramework); + if (message.scopeReportContents != null && Object.hasOwnProperty.call(message, "scopeReportContents")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.scopeReportContents); + return writer; + }; + + /** + * Encodes the specified GenerateFrameworkAuditScopeReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse} message GenerateFrameworkAuditScopeReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateFrameworkAuditScopeReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateFrameworkAuditScopeReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.scopeReportContents = reader.bytes(); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.complianceFramework = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateFrameworkAuditScopeReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateFrameworkAuditScopeReportResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateFrameworkAuditScopeReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.scopeReportContents != null && message.hasOwnProperty("scopeReportContents")) { + properties.auditReport = 1; + if (!(message.scopeReportContents && typeof message.scopeReportContents.length === "number" || $util.isString(message.scopeReportContents))) + return "scopeReportContents: buffer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) + if (!$util.isString(message.complianceFramework)) + return "complianceFramework: string expected"; + return null; + }; + + /** + * Creates a GenerateFrameworkAuditScopeReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse + */ + GenerateFrameworkAuditScopeReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse(); + if (object.scopeReportContents != null) + if (typeof object.scopeReportContents === "string") + $util.base64.decode(object.scopeReportContents, message.scopeReportContents = $util.newBuffer($util.base64.length(object.scopeReportContents)), 0); + else if (object.scopeReportContents.length >= 0) + message.scopeReportContents = object.scopeReportContents; + if (object.name != null) + message.name = String(object.name); + if (object.complianceFramework != null) + message.complianceFramework = String(object.complianceFramework); + return message; + }; + + /** + * Creates a plain object from a GenerateFrameworkAuditScopeReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} message GenerateFrameworkAuditScopeReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateFrameworkAuditScopeReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.complianceFramework = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) + object.complianceFramework = message.complianceFramework; + if (message.scopeReportContents != null && message.hasOwnProperty("scopeReportContents")) { + object.scopeReportContents = options.bytes === String ? $util.base64.encode(message.scopeReportContents, 0, message.scopeReportContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.scopeReportContents) : message.scopeReportContents; + if (options.oneofs) + object.auditReport = "scopeReportContents"; + } + return object; + }; + + /** + * Converts this GenerateFrameworkAuditScopeReportResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateFrameworkAuditScopeReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateFrameworkAuditScopeReportResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateFrameworkAuditScopeReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse"; + }; + + return GenerateFrameworkAuditScopeReportResponse; + })(); + + v1.ReportSummary = (function() { + + /** + * Properties of a ReportSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IReportSummary + * @property {number|null} [totalCount] ReportSummary totalCount + * @property {number|null} [compliantCount] ReportSummary compliantCount + * @property {number|null} [violationCount] ReportSummary violationCount + * @property {number|null} [manualReviewNeededCount] ReportSummary manualReviewNeededCount + * @property {number|null} [errorCount] ReportSummary errorCount + */ + + /** + * Constructs a new ReportSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ReportSummary. + * @implements IReportSummary + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary=} [properties] Properties to set + */ + function ReportSummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReportSummary totalCount. + * @member {number} totalCount + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @instance + */ + ReportSummary.prototype.totalCount = 0; + + /** + * ReportSummary compliantCount. + * @member {number} compliantCount + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @instance + */ + ReportSummary.prototype.compliantCount = 0; + + /** + * ReportSummary violationCount. + * @member {number} violationCount + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @instance + */ + ReportSummary.prototype.violationCount = 0; + + /** + * ReportSummary manualReviewNeededCount. + * @member {number} manualReviewNeededCount + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @instance + */ + ReportSummary.prototype.manualReviewNeededCount = 0; + + /** + * ReportSummary errorCount. + * @member {number} errorCount + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @instance + */ + ReportSummary.prototype.errorCount = 0; + + /** + * Creates a new ReportSummary instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary instance + */ + ReportSummary.create = function create(properties) { + return new ReportSummary(properties); + }; + + /** + * Encodes the specified ReportSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary} message ReportSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalCount); + if (message.compliantCount != null && Object.hasOwnProperty.call(message, "compliantCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compliantCount); + if (message.violationCount != null && Object.hasOwnProperty.call(message, "violationCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.violationCount); + if (message.manualReviewNeededCount != null && Object.hasOwnProperty.call(message, "manualReviewNeededCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.manualReviewNeededCount); + if (message.errorCount != null && Object.hasOwnProperty.call(message, "errorCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.errorCount); + return writer; + }; + + /** + * Encodes the specified ReportSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary} message ReportSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportSummary.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.totalCount = reader.int32(); + break; + } + case 2: { + message.compliantCount = reader.int32(); + break; + } + case 3: { + message.violationCount = reader.int32(); + break; + } + case 4: { + message.manualReviewNeededCount = reader.int32(); + break; + } + case 5: { + message.errorCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportSummary message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + if (!$util.isInteger(message.totalCount)) + return "totalCount: integer expected"; + if (message.compliantCount != null && message.hasOwnProperty("compliantCount")) + if (!$util.isInteger(message.compliantCount)) + return "compliantCount: integer expected"; + if (message.violationCount != null && message.hasOwnProperty("violationCount")) + if (!$util.isInteger(message.violationCount)) + return "violationCount: integer expected"; + if (message.manualReviewNeededCount != null && message.hasOwnProperty("manualReviewNeededCount")) + if (!$util.isInteger(message.manualReviewNeededCount)) + return "manualReviewNeededCount: integer expected"; + if (message.errorCount != null && message.hasOwnProperty("errorCount")) + if (!$util.isInteger(message.errorCount)) + return "errorCount: integer expected"; + return null; + }; + + /** + * Creates a ReportSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary + */ + ReportSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary(); + if (object.totalCount != null) + message.totalCount = object.totalCount | 0; + if (object.compliantCount != null) + message.compliantCount = object.compliantCount | 0; + if (object.violationCount != null) + message.violationCount = object.violationCount | 0; + if (object.manualReviewNeededCount != null) + message.manualReviewNeededCount = object.manualReviewNeededCount | 0; + if (object.errorCount != null) + message.errorCount = object.errorCount | 0; + return message; + }; + + /** + * Creates a plain object from a ReportSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ReportSummary} message ReportSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.totalCount = 0; + object.compliantCount = 0; + object.violationCount = 0; + object.manualReviewNeededCount = 0; + object.errorCount = 0; + } + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + object.totalCount = message.totalCount; + if (message.compliantCount != null && message.hasOwnProperty("compliantCount")) + object.compliantCount = message.compliantCount; + if (message.violationCount != null && message.hasOwnProperty("violationCount")) + object.violationCount = message.violationCount; + if (message.manualReviewNeededCount != null && message.hasOwnProperty("manualReviewNeededCount")) + object.manualReviewNeededCount = message.manualReviewNeededCount; + if (message.errorCount != null && message.hasOwnProperty("errorCount")) + object.errorCount = message.errorCount; + return object; + }; + + /** + * Converts this ReportSummary to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @instance + * @returns {Object.} JSON object + */ + ReportSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportSummary + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ReportSummary"; + }; + + return ReportSummary; + })(); + + v1.CreateFrameworkAuditRequest = (function() { + + /** + * Properties of a CreateFrameworkAuditRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICreateFrameworkAuditRequest + * @property {string|null} [parent] CreateFrameworkAuditRequest parent + * @property {string|null} [frameworkAuditId] CreateFrameworkAuditRequest frameworkAuditId + * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null} [frameworkAudit] CreateFrameworkAuditRequest frameworkAudit + */ + + /** + * Constructs a new CreateFrameworkAuditRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CreateFrameworkAuditRequest. + * @implements ICreateFrameworkAuditRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest=} [properties] Properties to set + */ + function CreateFrameworkAuditRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFrameworkAuditRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @instance + */ + CreateFrameworkAuditRequest.prototype.parent = ""; + + /** + * CreateFrameworkAuditRequest frameworkAuditId. + * @member {string} frameworkAuditId + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @instance + */ + CreateFrameworkAuditRequest.prototype.frameworkAuditId = ""; + + /** + * CreateFrameworkAuditRequest frameworkAudit. + * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null|undefined} frameworkAudit + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @instance + */ + CreateFrameworkAuditRequest.prototype.frameworkAudit = null; + + /** + * Creates a new CreateFrameworkAuditRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest instance + */ + CreateFrameworkAuditRequest.create = function create(properties) { + return new CreateFrameworkAuditRequest(properties); + }; + + /** + * Encodes the specified CreateFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} message CreateFrameworkAuditRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFrameworkAuditRequest.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.frameworkAuditId != null && Object.hasOwnProperty.call(message, "frameworkAuditId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkAuditId); + if (message.frameworkAudit != null && Object.hasOwnProperty.call(message, "frameworkAudit")) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.encode(message.frameworkAudit, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} message CreateFrameworkAuditRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFrameworkAuditRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFrameworkAuditRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.frameworkAuditId = reader.string(); + break; + } + case 3: { + message.frameworkAudit = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFrameworkAuditRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFrameworkAuditRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFrameworkAuditRequest.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.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) + if (!$util.isString(message.frameworkAuditId)) + return "frameworkAuditId: string expected"; + if (message.frameworkAudit != null && message.hasOwnProperty("frameworkAudit")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify(message.frameworkAudit); + if (error) + return "frameworkAudit." + error; + } + return null; + }; + + /** + * Creates a CreateFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest + */ + CreateFrameworkAuditRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.frameworkAuditId != null) + message.frameworkAuditId = String(object.frameworkAuditId); + if (object.frameworkAudit != null) { + if (typeof object.frameworkAudit !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.frameworkAudit: object expected"); + message.frameworkAudit = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.fromObject(object.frameworkAudit); + } + return message; + }; + + /** + * Creates a plain object from a CreateFrameworkAuditRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} message CreateFrameworkAuditRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFrameworkAuditRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.frameworkAuditId = ""; + object.frameworkAudit = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) + object.frameworkAuditId = message.frameworkAuditId; + if (message.frameworkAudit != null && message.hasOwnProperty("frameworkAudit")) + object.frameworkAudit = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.toObject(message.frameworkAudit, options); + return object; + }; + + /** + * Converts this CreateFrameworkAuditRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFrameworkAuditRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFrameworkAuditRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFrameworkAuditRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest"; + }; + + return CreateFrameworkAuditRequest; + })(); + + v1.FrameworkAuditDestination = (function() { + + /** + * Properties of a FrameworkAuditDestination. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFrameworkAuditDestination + * @property {google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null} [bucket] FrameworkAuditDestination bucket + */ + + /** + * Constructs a new FrameworkAuditDestination. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FrameworkAuditDestination. + * @implements IFrameworkAuditDestination + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination=} [properties] Properties to set + */ + function FrameworkAuditDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FrameworkAuditDestination bucket. + * @member {google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null|undefined} bucket + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @instance + */ + FrameworkAuditDestination.prototype.bucket = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FrameworkAuditDestination destinationType. + * @member {"bucket"|undefined} destinationType + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @instance + */ + Object.defineProperty(FrameworkAuditDestination.prototype, "destinationType", { + get: $util.oneOfGetter($oneOfFields = ["bucket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FrameworkAuditDestination instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination instance + */ + FrameworkAuditDestination.create = function create(properties) { + return new FrameworkAuditDestination(properties); + }; + + /** + * Encodes the specified FrameworkAuditDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination} message FrameworkAuditDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkAuditDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.encode(message.bucket, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FrameworkAuditDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination} message FrameworkAuditDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkAuditDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrameworkAuditDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkAuditDestination.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bucket = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrameworkAuditDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkAuditDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrameworkAuditDestination message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrameworkAuditDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + properties.destinationType = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify(message.bucket); + if (error) + return "bucket." + error; + } + } + return null; + }; + + /** + * Creates a FrameworkAuditDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination + */ + FrameworkAuditDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination(); + if (object.bucket != null) { + if (typeof object.bucket !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.bucket: object expected"); + message.bucket = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.fromObject(object.bucket); + } + return message; + }; + + /** + * Creates a plain object from a FrameworkAuditDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} message FrameworkAuditDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrameworkAuditDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bucket != null && message.hasOwnProperty("bucket")) { + object.bucket = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.toObject(message.bucket, options); + if (options.oneofs) + object.destinationType = "bucket"; + } + return object; + }; + + /** + * Converts this FrameworkAuditDestination to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @instance + * @returns {Object.} JSON object + */ + FrameworkAuditDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrameworkAuditDestination + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrameworkAuditDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination"; + }; + + return FrameworkAuditDestination; + })(); + + v1.BucketDestination = (function() { + + /** + * Properties of a BucketDestination. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IBucketDestination + * @property {string|null} [bucketUri] BucketDestination bucketUri + * @property {google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|null} [frameworkAuditFormat] BucketDestination frameworkAuditFormat + */ + + /** + * Constructs a new BucketDestination. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a BucketDestination. + * @implements IBucketDestination + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination=} [properties] Properties to set + */ + function BucketDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BucketDestination bucketUri. + * @member {string} bucketUri + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @instance + */ + BucketDestination.prototype.bucketUri = ""; + + /** + * BucketDestination frameworkAuditFormat. + * @member {google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format} frameworkAuditFormat + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @instance + */ + BucketDestination.prototype.frameworkAuditFormat = 0; + + /** + * Creates a new BucketDestination instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination instance + */ + BucketDestination.create = function create(properties) { + return new BucketDestination(properties); + }; + + /** + * Encodes the specified BucketDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination} message BucketDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucketUri != null && Object.hasOwnProperty.call(message, "bucketUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketUri); + if (message.frameworkAuditFormat != null && Object.hasOwnProperty.call(message, "frameworkAuditFormat")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.frameworkAuditFormat); + return writer; + }; + + /** + * Encodes the specified BucketDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination} message BucketDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BucketDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketDestination.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bucketUri = reader.string(); + break; + } + case 3: { + message.frameworkAuditFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BucketDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BucketDestination message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucketUri != null && message.hasOwnProperty("bucketUri")) + if (!$util.isString(message.bucketUri)) + return "bucketUri: string expected"; + if (message.frameworkAuditFormat != null && message.hasOwnProperty("frameworkAuditFormat")) + switch (message.frameworkAuditFormat) { + default: + return "frameworkAuditFormat: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a BucketDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination + */ + BucketDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination(); + if (object.bucketUri != null) + message.bucketUri = String(object.bucketUri); + switch (object.frameworkAuditFormat) { + default: + if (typeof object.frameworkAuditFormat === "number") { + message.frameworkAuditFormat = object.frameworkAuditFormat; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.frameworkAuditFormat = 0; + break; + case "ODF": + case 1: + message.frameworkAuditFormat = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a BucketDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.BucketDestination} message BucketDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucketUri = ""; + object.frameworkAuditFormat = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + } + if (message.bucketUri != null && message.hasOwnProperty("bucketUri")) + object.bucketUri = message.bucketUri; + if (message.frameworkAuditFormat != null && message.hasOwnProperty("frameworkAuditFormat")) + object.frameworkAuditFormat = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format[message.frameworkAuditFormat] === undefined ? message.frameworkAuditFormat : $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format[message.frameworkAuditFormat] : message.frameworkAuditFormat; + return object; + }; + + /** + * Converts this BucketDestination to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @instance + * @returns {Object.} JSON object + */ + BucketDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BucketDestination + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BucketDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.BucketDestination"; + }; + + /** + * Format enum. + * @name google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} ODF=1 ODF value + */ + BucketDestination.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "ODF"] = 1; + return values; + })(); + + return BucketDestination; + })(); + + v1.FrameworkAudit = (function() { + + /** + * Properties of a FrameworkAudit. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFrameworkAudit + * @property {string|null} [name] FrameworkAudit name + * @property {string|null} [frameworkAuditId] FrameworkAudit frameworkAuditId + * @property {string|null} [complianceFramework] FrameworkAudit complianceFramework + * @property {string|null} [scope] FrameworkAudit scope + * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null} [frameworkAuditDestination] FrameworkAudit frameworkAuditDestination + * @property {google.protobuf.ITimestamp|null} [startTime] FrameworkAudit startTime + * @property {google.protobuf.ITimestamp|null} [finishTime] FrameworkAudit finishTime + * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] FrameworkAudit complianceState + * @property {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null} [reportSummary] FrameworkAudit reportSummary + * @property {Array.|null} [cloudControlGroupAuditDetails] FrameworkAudit cloudControlGroupAuditDetails + * @property {Array.|null} [cloudControlAuditDetails] FrameworkAudit cloudControlAuditDetails + * @property {string|null} [operationId] FrameworkAudit operationId + * @property {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|null} [state] FrameworkAudit state + */ + + /** + * Constructs a new FrameworkAudit. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FrameworkAudit. + * @implements IFrameworkAudit + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit=} [properties] Properties to set + */ + function FrameworkAudit(properties) { + this.cloudControlGroupAuditDetails = []; + this.cloudControlAuditDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FrameworkAudit name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.name = ""; + + /** + * FrameworkAudit frameworkAuditId. + * @member {string} frameworkAuditId + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.frameworkAuditId = ""; + + /** + * FrameworkAudit complianceFramework. + * @member {string} complianceFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.complianceFramework = ""; + + /** + * FrameworkAudit scope. + * @member {string} scope + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.scope = ""; + + /** + * FrameworkAudit frameworkAuditDestination. + * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null|undefined} frameworkAuditDestination + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.frameworkAuditDestination = null; + + /** + * FrameworkAudit startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.startTime = null; + + /** + * FrameworkAudit finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.finishTime = null; + + /** + * FrameworkAudit complianceState. + * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.complianceState = 0; + + /** + * FrameworkAudit reportSummary. + * @member {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null|undefined} reportSummary + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.reportSummary = null; + + /** + * FrameworkAudit cloudControlGroupAuditDetails. + * @member {Array.} cloudControlGroupAuditDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.cloudControlGroupAuditDetails = $util.emptyArray; + + /** + * FrameworkAudit cloudControlAuditDetails. + * @member {Array.} cloudControlAuditDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.cloudControlAuditDetails = $util.emptyArray; + + /** + * FrameworkAudit operationId. + * @member {string} operationId + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.operationId = ""; + + /** + * FrameworkAudit state. + * @member {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State} state + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + */ + FrameworkAudit.prototype.state = 0; + + /** + * Creates a new FrameworkAudit instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit instance + */ + FrameworkAudit.create = function create(properties) { + return new FrameworkAudit(properties); + }; + + /** + * Encodes the specified FrameworkAudit message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit} message FrameworkAudit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkAudit.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.frameworkAuditId != null && Object.hasOwnProperty.call(message, "frameworkAuditId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkAuditId); + if (message.complianceFramework != null && Object.hasOwnProperty.call(message, "complianceFramework")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.complianceFramework); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.scope); + if (message.frameworkAuditDestination != null && Object.hasOwnProperty.call(message, "frameworkAuditDestination")) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.encode(message.frameworkAuditDestination, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.complianceState); + if (message.reportSummary != null && Object.hasOwnProperty.call(message, "reportSummary")) + $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.encode(message.reportSummary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.cloudControlGroupAuditDetails != null && message.cloudControlGroupAuditDetails.length) + for (var i = 0; i < message.cloudControlGroupAuditDetails.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.encode(message.cloudControlGroupAuditDetails[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.cloudControlAuditDetails != null && message.cloudControlAuditDetails.length) + for (var i = 0; i < message.cloudControlAuditDetails.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.encode(message.cloudControlAuditDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.operationId); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); + return writer; + }; + + /** + * Encodes the specified FrameworkAudit message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit} message FrameworkAudit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkAudit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrameworkAudit message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkAudit.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.frameworkAuditId = reader.string(); + break; + } + case 3: { + message.complianceFramework = reader.string(); + break; + } + case 4: { + message.scope = reader.string(); + break; + } + case 5: { + message.frameworkAuditDestination = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.decode(reader, reader.uint32()); + break; + } + case 6: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.complianceState = reader.int32(); + break; + } + case 9: { + message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.cloudControlGroupAuditDetails && message.cloudControlGroupAuditDetails.length)) + message.cloudControlGroupAuditDetails = []; + message.cloudControlGroupAuditDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.cloudControlAuditDetails && message.cloudControlAuditDetails.length)) + message.cloudControlAuditDetails = []; + message.cloudControlAuditDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.decode(reader, reader.uint32())); + break; + } + case 12: { + message.operationId = reader.string(); + break; + } + case 13: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrameworkAudit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkAudit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrameworkAudit message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrameworkAudit.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.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) + if (!$util.isString(message.frameworkAuditId)) + return "frameworkAuditId: string expected"; + if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) + if (!$util.isString(message.complianceFramework)) + return "complianceFramework: string expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + if (message.frameworkAuditDestination != null && message.hasOwnProperty("frameworkAuditDestination")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify(message.frameworkAuditDestination); + if (error) + return "frameworkAuditDestination." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify(message.reportSummary); + if (error) + return "reportSummary." + error; + } + if (message.cloudControlGroupAuditDetails != null && message.hasOwnProperty("cloudControlGroupAuditDetails")) { + if (!Array.isArray(message.cloudControlGroupAuditDetails)) + return "cloudControlGroupAuditDetails: array expected"; + for (var i = 0; i < message.cloudControlGroupAuditDetails.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify(message.cloudControlGroupAuditDetails[i]); + if (error) + return "cloudControlGroupAuditDetails." + error; + } + } + if (message.cloudControlAuditDetails != null && message.hasOwnProperty("cloudControlAuditDetails")) { + if (!Array.isArray(message.cloudControlAuditDetails)) + return "cloudControlAuditDetails: array expected"; + for (var i = 0; i < message.cloudControlAuditDetails.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify(message.cloudControlAuditDetails[i]); + if (error) + return "cloudControlAuditDetails." + error; + } + } + if (message.operationId != null && message.hasOwnProperty("operationId")) + if (!$util.isString(message.operationId)) + return "operationId: string expected"; + 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: + case 5: + break; + } + return null; + }; + + /** + * Creates a FrameworkAudit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit + */ + FrameworkAudit.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit(); + if (object.name != null) + message.name = String(object.name); + if (object.frameworkAuditId != null) + message.frameworkAuditId = String(object.frameworkAuditId); + if (object.complianceFramework != null) + message.complianceFramework = String(object.complianceFramework); + if (object.scope != null) + message.scope = String(object.scope); + if (object.frameworkAuditDestination != null) { + if (typeof object.frameworkAuditDestination !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.frameworkAuditDestination: object expected"); + message.frameworkAuditDestination = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.fromObject(object.frameworkAuditDestination); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; + case "COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "VIOLATION": + case 2: + message.complianceState = 2; + break; + case "MANUAL_REVIEW_NEEDED": + case 3: + message.complianceState = 3; + break; + case "ERROR": + case 4: + message.complianceState = 4; + break; + case "AUDIT_NOT_SUPPORTED": + case 5: + message.complianceState = 5; + break; + } + if (object.reportSummary != null) { + if (typeof object.reportSummary !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.reportSummary: object expected"); + message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.fromObject(object.reportSummary); + } + if (object.cloudControlGroupAuditDetails) { + if (!Array.isArray(object.cloudControlGroupAuditDetails)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlGroupAuditDetails: array expected"); + message.cloudControlGroupAuditDetails = []; + for (var i = 0; i < object.cloudControlGroupAuditDetails.length; ++i) { + if (typeof object.cloudControlGroupAuditDetails[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlGroupAuditDetails: object expected"); + message.cloudControlGroupAuditDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.fromObject(object.cloudControlGroupAuditDetails[i]); + } + } + if (object.cloudControlAuditDetails) { + if (!Array.isArray(object.cloudControlAuditDetails)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlAuditDetails: array expected"); + message.cloudControlAuditDetails = []; + for (var i = 0; i < object.cloudControlAuditDetails.length; ++i) { + if (typeof object.cloudControlAuditDetails[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlAuditDetails: object expected"); + message.cloudControlAuditDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.fromObject(object.cloudControlAuditDetails[i]); + } + } + if (object.operationId != null) + message.operationId = String(object.operationId); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SCHEDULED": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "UPLOADING": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a FrameworkAudit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} message FrameworkAudit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrameworkAudit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.cloudControlGroupAuditDetails = []; + object.cloudControlAuditDetails = []; + } + if (options.defaults) { + object.name = ""; + object.frameworkAuditId = ""; + object.complianceFramework = ""; + object.scope = ""; + object.frameworkAuditDestination = null; + object.startTime = null; + object.finishTime = null; + object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; + object.reportSummary = null; + object.operationId = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) + object.frameworkAuditId = message.frameworkAuditId; + if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) + object.complianceFramework = message.complianceFramework; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; + if (message.frameworkAuditDestination != null && message.hasOwnProperty("frameworkAuditDestination")) + object.frameworkAuditDestination = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.toObject(message.frameworkAuditDestination, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; + if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) + object.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.toObject(message.reportSummary, options); + if (message.cloudControlGroupAuditDetails && message.cloudControlGroupAuditDetails.length) { + object.cloudControlGroupAuditDetails = []; + for (var j = 0; j < message.cloudControlGroupAuditDetails.length; ++j) + object.cloudControlGroupAuditDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.toObject(message.cloudControlGroupAuditDetails[j], options); + } + if (message.cloudControlAuditDetails && message.cloudControlAuditDetails.length) { + object.cloudControlAuditDetails = []; + for (var j = 0; j < message.cloudControlAuditDetails.length; ++j) + object.cloudControlAuditDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.toObject(message.cloudControlAuditDetails[j], options); + } + if (message.operationId != null && message.hasOwnProperty("operationId")) + object.operationId = message.operationId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State[message.state] === undefined ? message.state : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State[message.state] : message.state; + return object; + }; + + /** + * Converts this FrameworkAudit to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @instance + * @returns {Object.} JSON object + */ + FrameworkAudit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrameworkAudit + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrameworkAudit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkAudit"; + }; + + /** + * State enum. + * @name google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} RUNNING=2 RUNNING value + * @property {number} UPLOADING=3 UPLOADING value + * @property {number} FAILED=4 FAILED value + * @property {number} SUCCEEDED=5 SUCCEEDED value + */ + FrameworkAudit.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "UPLOADING"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + return values; + })(); + + return FrameworkAudit; + })(); + + v1.ListFrameworkAuditsRequest = (function() { + + /** + * Properties of a ListFrameworkAuditsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworkAuditsRequest + * @property {string|null} [parent] ListFrameworkAuditsRequest parent + * @property {number|null} [pageSize] ListFrameworkAuditsRequest pageSize + * @property {string|null} [pageToken] ListFrameworkAuditsRequest pageToken + * @property {string|null} [filter] ListFrameworkAuditsRequest filter + */ + + /** + * Constructs a new ListFrameworkAuditsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworkAuditsRequest. + * @implements IListFrameworkAuditsRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest=} [properties] Properties to set + */ + function ListFrameworkAuditsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworkAuditsRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @instance + */ + ListFrameworkAuditsRequest.prototype.parent = ""; + + /** + * ListFrameworkAuditsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @instance + */ + ListFrameworkAuditsRequest.prototype.pageSize = 0; + + /** + * ListFrameworkAuditsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @instance + */ + ListFrameworkAuditsRequest.prototype.pageToken = ""; + + /** + * ListFrameworkAuditsRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @instance + */ + ListFrameworkAuditsRequest.prototype.filter = ""; + + /** + * Creates a new ListFrameworkAuditsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest instance + */ + ListFrameworkAuditsRequest.create = function create(properties) { + return new ListFrameworkAuditsRequest(properties); + }; + + /** + * Encodes the specified ListFrameworkAuditsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} message ListFrameworkAuditsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkAuditsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListFrameworkAuditsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} message ListFrameworkAuditsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkAuditsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkAuditsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkAuditsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworkAuditsRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworkAuditsRequest.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"; + return null; + }; + + /** + * Creates a ListFrameworkAuditsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest + */ + ListFrameworkAuditsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListFrameworkAuditsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} message ListFrameworkAuditsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworkAuditsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this ListFrameworkAuditsRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @instance + * @returns {Object.} JSON object + */ + ListFrameworkAuditsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworkAuditsRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworkAuditsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest"; + }; + + return ListFrameworkAuditsRequest; + })(); + + v1.ListFrameworkAuditsResponse = (function() { + + /** + * Properties of a ListFrameworkAuditsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworkAuditsResponse + * @property {Array.|null} [frameworkAudits] ListFrameworkAuditsResponse frameworkAudits + * @property {string|null} [nextPageToken] ListFrameworkAuditsResponse nextPageToken + */ + + /** + * Constructs a new ListFrameworkAuditsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworkAuditsResponse. + * @implements IListFrameworkAuditsResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse=} [properties] Properties to set + */ + function ListFrameworkAuditsResponse(properties) { + this.frameworkAudits = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworkAuditsResponse frameworkAudits. + * @member {Array.} frameworkAudits + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @instance + */ + ListFrameworkAuditsResponse.prototype.frameworkAudits = $util.emptyArray; + + /** + * ListFrameworkAuditsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @instance + */ + ListFrameworkAuditsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFrameworkAuditsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse instance + */ + ListFrameworkAuditsResponse.create = function create(properties) { + return new ListFrameworkAuditsResponse(properties); + }; + + /** + * Encodes the specified ListFrameworkAuditsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse} message ListFrameworkAuditsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkAuditsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frameworkAudits != null && message.frameworkAudits.length) + for (var i = 0; i < message.frameworkAudits.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.encode(message.frameworkAudits[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 ListFrameworkAuditsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse} message ListFrameworkAuditsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkAuditsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkAuditsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.frameworkAudits && message.frameworkAudits.length)) + message.frameworkAudits = []; + message.frameworkAudits.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkAuditsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworkAuditsResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworkAuditsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frameworkAudits != null && message.hasOwnProperty("frameworkAudits")) { + if (!Array.isArray(message.frameworkAudits)) + return "frameworkAudits: array expected"; + for (var i = 0; i < message.frameworkAudits.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify(message.frameworkAudits[i]); + if (error) + return "frameworkAudits." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFrameworkAuditsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse + */ + ListFrameworkAuditsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse(); + if (object.frameworkAudits) { + if (!Array.isArray(object.frameworkAudits)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.frameworkAudits: array expected"); + message.frameworkAudits = []; + for (var i = 0; i < object.frameworkAudits.length; ++i) { + if (typeof object.frameworkAudits[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.frameworkAudits: object expected"); + message.frameworkAudits[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.fromObject(object.frameworkAudits[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFrameworkAuditsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} message ListFrameworkAuditsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworkAuditsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.frameworkAudits = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.frameworkAudits && message.frameworkAudits.length) { + object.frameworkAudits = []; + for (var j = 0; j < message.frameworkAudits.length; ++j) + object.frameworkAudits[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.toObject(message.frameworkAudits[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFrameworkAuditsResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @instance + * @returns {Object.} JSON object + */ + ListFrameworkAuditsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworkAuditsResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworkAuditsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse"; + }; + + return ListFrameworkAuditsResponse; + })(); + + v1.GetFrameworkAuditRequest = (function() { + + /** + * Properties of a GetFrameworkAuditRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IGetFrameworkAuditRequest + * @property {string|null} [name] GetFrameworkAuditRequest name + */ + + /** + * Constructs a new GetFrameworkAuditRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a GetFrameworkAuditRequest. + * @implements IGetFrameworkAuditRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest=} [properties] Properties to set + */ + function GetFrameworkAuditRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFrameworkAuditRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @instance + */ + GetFrameworkAuditRequest.prototype.name = ""; + + /** + * Creates a new GetFrameworkAuditRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest instance + */ + GetFrameworkAuditRequest.create = function create(properties) { + return new GetFrameworkAuditRequest(properties); + }; + + /** + * Encodes the specified GetFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} message GetFrameworkAuditRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFrameworkAuditRequest.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 GetFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} message GetFrameworkAuditRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFrameworkAuditRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFrameworkAuditRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFrameworkAuditRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFrameworkAuditRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFrameworkAuditRequest.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 GetFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest + */ + GetFrameworkAuditRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFrameworkAuditRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} message GetFrameworkAuditRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFrameworkAuditRequest.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 GetFrameworkAuditRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @instance + * @returns {Object.} JSON object + */ + GetFrameworkAuditRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFrameworkAuditRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFrameworkAuditRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest"; + }; + + return GetFrameworkAuditRequest; + })(); + + v1.CloudControlGroupAuditDetails = (function() { + + /** + * Properties of a CloudControlGroupAuditDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlGroupAuditDetails + * @property {string|null} [cloudControlGroupId] CloudControlGroupAuditDetails cloudControlGroupId + * @property {string|null} [displayName] CloudControlGroupAuditDetails displayName + * @property {string|null} [description] CloudControlGroupAuditDetails description + * @property {string|null} [responsibilityType] CloudControlGroupAuditDetails responsibilityType + * @property {string|null} [googleResponsibilityDescription] CloudControlGroupAuditDetails googleResponsibilityDescription + * @property {string|null} [googleResponsibilityImplementation] CloudControlGroupAuditDetails googleResponsibilityImplementation + * @property {string|null} [customerResponsibilityDescription] CloudControlGroupAuditDetails customerResponsibilityDescription + * @property {string|null} [customerResponsibilityImplementation] CloudControlGroupAuditDetails customerResponsibilityImplementation + * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] CloudControlGroupAuditDetails complianceState + * @property {string|null} [controlId] CloudControlGroupAuditDetails controlId + * @property {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null} [controlFamily] CloudControlGroupAuditDetails controlFamily + * @property {Array.|null} [cloudControlDetails] CloudControlGroupAuditDetails cloudControlDetails + * @property {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null} [reportSummary] CloudControlGroupAuditDetails reportSummary + */ + + /** + * Constructs a new CloudControlGroupAuditDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlGroupAuditDetails. + * @implements ICloudControlGroupAuditDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails=} [properties] Properties to set + */ + function CloudControlGroupAuditDetails(properties) { + this.cloudControlDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlGroupAuditDetails cloudControlGroupId. + * @member {string} cloudControlGroupId + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.cloudControlGroupId = ""; + + /** + * CloudControlGroupAuditDetails displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.displayName = ""; + + /** + * CloudControlGroupAuditDetails description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.description = ""; + + /** + * CloudControlGroupAuditDetails responsibilityType. + * @member {string} responsibilityType + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.responsibilityType = ""; + + /** + * CloudControlGroupAuditDetails googleResponsibilityDescription. + * @member {string} googleResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.googleResponsibilityDescription = ""; + + /** + * CloudControlGroupAuditDetails googleResponsibilityImplementation. + * @member {string} googleResponsibilityImplementation + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.googleResponsibilityImplementation = ""; + + /** + * CloudControlGroupAuditDetails customerResponsibilityDescription. + * @member {string} customerResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.customerResponsibilityDescription = ""; + + /** + * CloudControlGroupAuditDetails customerResponsibilityImplementation. + * @member {string} customerResponsibilityImplementation + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.customerResponsibilityImplementation = ""; + + /** + * CloudControlGroupAuditDetails complianceState. + * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.complianceState = 0; + + /** + * CloudControlGroupAuditDetails controlId. + * @member {string} controlId + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.controlId = ""; + + /** + * CloudControlGroupAuditDetails controlFamily. + * @member {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null|undefined} controlFamily + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.controlFamily = null; + + /** + * CloudControlGroupAuditDetails cloudControlDetails. + * @member {Array.} cloudControlDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.cloudControlDetails = $util.emptyArray; + + /** + * CloudControlGroupAuditDetails reportSummary. + * @member {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null|undefined} reportSummary + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + */ + CloudControlGroupAuditDetails.prototype.reportSummary = null; + + /** + * Creates a new CloudControlGroupAuditDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails instance + */ + CloudControlGroupAuditDetails.create = function create(properties) { + return new CloudControlGroupAuditDetails(properties); + }; + + /** + * Encodes the specified CloudControlGroupAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails} message CloudControlGroupAuditDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlGroupAuditDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudControlGroupId != null && Object.hasOwnProperty.call(message, "cloudControlGroupId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControlGroupId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.responsibilityType != null && Object.hasOwnProperty.call(message, "responsibilityType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.responsibilityType); + if (message.googleResponsibilityDescription != null && Object.hasOwnProperty.call(message, "googleResponsibilityDescription")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.googleResponsibilityDescription); + if (message.googleResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "googleResponsibilityImplementation")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.googleResponsibilityImplementation); + if (message.customerResponsibilityDescription != null && Object.hasOwnProperty.call(message, "customerResponsibilityDescription")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.customerResponsibilityDescription); + if (message.customerResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "customerResponsibilityImplementation")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.customerResponsibilityImplementation); + if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.complianceState); + if (message.controlId != null && Object.hasOwnProperty.call(message, "controlId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.controlId); + if (message.controlFamily != null && Object.hasOwnProperty.call(message, "controlFamily")) + $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.encode(message.controlFamily, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cloudControlDetails != null && message.cloudControlDetails.length) + for (var i = 0; i < message.cloudControlDetails.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.encode(message.cloudControlDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.reportSummary != null && Object.hasOwnProperty.call(message, "reportSummary")) + $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.encode(message.reportSummary, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudControlGroupAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails} message CloudControlGroupAuditDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlGroupAuditDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlGroupAuditDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cloudControlGroupId = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.responsibilityType = reader.string(); + break; + } + case 5: { + message.googleResponsibilityDescription = reader.string(); + break; + } + case 6: { + message.googleResponsibilityImplementation = reader.string(); + break; + } + case 7: { + message.customerResponsibilityDescription = reader.string(); + break; + } + case 8: { + message.customerResponsibilityImplementation = reader.string(); + break; + } + case 9: { + message.complianceState = reader.int32(); + break; + } + case 10: { + message.controlId = reader.string(); + break; + } + case 11: { + message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.cloudControlDetails && message.cloudControlDetails.length)) + message.cloudControlDetails = []; + message.cloudControlDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.decode(reader, reader.uint32())); + break; + } + case 13: { + message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlGroupAuditDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlGroupAuditDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlGroupAuditDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudControlGroupId != null && message.hasOwnProperty("cloudControlGroupId")) + if (!$util.isString(message.cloudControlGroupId)) + return "cloudControlGroupId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) + if (!$util.isString(message.responsibilityType)) + return "responsibilityType: string expected"; + if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) + if (!$util.isString(message.googleResponsibilityDescription)) + return "googleResponsibilityDescription: string expected"; + if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) + if (!$util.isString(message.googleResponsibilityImplementation)) + return "googleResponsibilityImplementation: string expected"; + if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) + if (!$util.isString(message.customerResponsibilityDescription)) + return "customerResponsibilityDescription: string expected"; + if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) + if (!$util.isString(message.customerResponsibilityImplementation)) + return "customerResponsibilityImplementation: string expected"; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.controlId != null && message.hasOwnProperty("controlId")) + if (!$util.isString(message.controlId)) + return "controlId: string expected"; + if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify(message.controlFamily); + if (error) + return "controlFamily." + error; + } + if (message.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) { + if (!Array.isArray(message.cloudControlDetails)) + return "cloudControlDetails: array expected"; + for (var i = 0; i < message.cloudControlDetails.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify(message.cloudControlDetails[i]); + if (error) + return "cloudControlDetails." + error; + } + } + if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify(message.reportSummary); + if (error) + return "reportSummary." + error; + } + return null; + }; + + /** + * Creates a CloudControlGroupAuditDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails + */ + CloudControlGroupAuditDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails(); + if (object.cloudControlGroupId != null) + message.cloudControlGroupId = String(object.cloudControlGroupId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.responsibilityType != null) + message.responsibilityType = String(object.responsibilityType); + if (object.googleResponsibilityDescription != null) + message.googleResponsibilityDescription = String(object.googleResponsibilityDescription); + if (object.googleResponsibilityImplementation != null) + message.googleResponsibilityImplementation = String(object.googleResponsibilityImplementation); + if (object.customerResponsibilityDescription != null) + message.customerResponsibilityDescription = String(object.customerResponsibilityDescription); + if (object.customerResponsibilityImplementation != null) + message.customerResponsibilityImplementation = String(object.customerResponsibilityImplementation); + switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; + case "COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "VIOLATION": + case 2: + message.complianceState = 2; + break; + case "MANUAL_REVIEW_NEEDED": + case 3: + message.complianceState = 3; + break; + case "ERROR": + case 4: + message.complianceState = 4; + break; + case "AUDIT_NOT_SUPPORTED": + case 5: + message.complianceState = 5; + break; + } + if (object.controlId != null) + message.controlId = String(object.controlId); + if (object.controlFamily != null) { + if (typeof object.controlFamily !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.controlFamily: object expected"); + message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.fromObject(object.controlFamily); + } + if (object.cloudControlDetails) { + if (!Array.isArray(object.cloudControlDetails)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.cloudControlDetails: array expected"); + message.cloudControlDetails = []; + for (var i = 0; i < object.cloudControlDetails.length; ++i) { + if (typeof object.cloudControlDetails[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.cloudControlDetails: object expected"); + message.cloudControlDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.fromObject(object.cloudControlDetails[i]); + } + } + if (object.reportSummary != null) { + if (typeof object.reportSummary !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.reportSummary: object expected"); + message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.fromObject(object.reportSummary); + } + return message; + }; + + /** + * Creates a plain object from a CloudControlGroupAuditDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} message CloudControlGroupAuditDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlGroupAuditDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cloudControlDetails = []; + if (options.defaults) { + object.cloudControlGroupId = ""; + object.displayName = ""; + object.description = ""; + object.responsibilityType = ""; + object.googleResponsibilityDescription = ""; + object.googleResponsibilityImplementation = ""; + object.customerResponsibilityDescription = ""; + object.customerResponsibilityImplementation = ""; + object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; + object.controlId = ""; + object.controlFamily = null; + object.reportSummary = null; + } + if (message.cloudControlGroupId != null && message.hasOwnProperty("cloudControlGroupId")) + object.cloudControlGroupId = message.cloudControlGroupId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) + object.responsibilityType = message.responsibilityType; + if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) + object.googleResponsibilityDescription = message.googleResponsibilityDescription; + if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) + object.googleResponsibilityImplementation = message.googleResponsibilityImplementation; + if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) + object.customerResponsibilityDescription = message.customerResponsibilityDescription; + if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) + object.customerResponsibilityImplementation = message.customerResponsibilityImplementation; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; + if (message.controlId != null && message.hasOwnProperty("controlId")) + object.controlId = message.controlId; + if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) + object.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.toObject(message.controlFamily, options); + if (message.cloudControlDetails && message.cloudControlDetails.length) { + object.cloudControlDetails = []; + for (var j = 0; j < message.cloudControlDetails.length; ++j) + object.cloudControlDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.toObject(message.cloudControlDetails[j], options); + } + if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) + object.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.toObject(message.reportSummary, options); + return object; + }; + + /** + * Converts this CloudControlGroupAuditDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @instance + * @returns {Object.} JSON object + */ + CloudControlGroupAuditDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlGroupAuditDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlGroupAuditDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails"; + }; + + return CloudControlGroupAuditDetails; + })(); + + v1.FindingDetails = (function() { + + /** + * Properties of a FindingDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFindingDetails + * @property {string|null} [name] FindingDetails name + * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] FindingDetails complianceState + * @property {google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null} [observation] FindingDetails observation + * @property {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null} [evidence] FindingDetails evidence + */ + + /** + * Constructs a new FindingDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FindingDetails. + * @implements IFindingDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails=} [properties] Properties to set + */ + function FindingDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FindingDetails name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @instance + */ + FindingDetails.prototype.name = ""; + + /** + * FindingDetails complianceState. + * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @instance + */ + FindingDetails.prototype.complianceState = 0; + + /** + * FindingDetails observation. + * @member {google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null|undefined} observation + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @instance + */ + FindingDetails.prototype.observation = null; + + /** + * FindingDetails evidence. + * @member {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null|undefined} evidence + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @instance + */ + FindingDetails.prototype.evidence = null; + + /** + * Creates a new FindingDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails instance + */ + FindingDetails.create = function create(properties) { + return new FindingDetails(properties); + }; + + /** + * Encodes the specified FindingDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails} message FindingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindingDetails.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.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.complianceState); + if (message.observation != null && Object.hasOwnProperty.call(message, "observation")) + $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.encode(message.observation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.encode(message.evidence, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FindingDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails} message FindingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindingDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FindingDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindingDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.complianceState = reader.int32(); + break; + } + case 3: { + message.observation = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.decode(reader, reader.uint32()); + break; + } + case 4: { + message.evidence = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FindingDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindingDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FindingDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FindingDetails.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.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.observation != null && message.hasOwnProperty("observation")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify(message.observation); + if (error) + return "observation." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify(message.evidence); + if (error) + return "evidence." + error; + } + return null; + }; + + /** + * Creates a FindingDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails + */ + FindingDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails(); + if (object.name != null) + message.name = String(object.name); + switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; + case "COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "VIOLATION": + case 2: + message.complianceState = 2; + break; + case "MANUAL_REVIEW_NEEDED": + case 3: + message.complianceState = 3; + break; + case "ERROR": + case 4: + message.complianceState = 4; + break; + case "AUDIT_NOT_SUPPORTED": + case 5: + message.complianceState = 5; + break; + } + if (object.observation != null) { + if (typeof object.observation !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingDetails.observation: object expected"); + message.observation = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.fromObject(object.observation); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingDetails.evidence: object expected"); + message.evidence = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.fromObject(object.evidence); + } + return message; + }; + + /** + * Creates a plain object from a FindingDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FindingDetails} message FindingDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FindingDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; + object.observation = null; + object.evidence = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; + if (message.observation != null && message.hasOwnProperty("observation")) + object.observation = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.toObject(message.observation, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.toObject(message.evidence, options); + return object; + }; + + /** + * Converts this FindingDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @instance + * @returns {Object.} JSON object + */ + FindingDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FindingDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FindingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FindingDetails"; + }; + + return FindingDetails; + })(); + + v1.ObservationDetails = (function() { + + /** + * Properties of an ObservationDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IObservationDetails + * @property {string|null} [currentValue] ObservationDetails currentValue + * @property {string|null} [expectedValue] ObservationDetails expectedValue + * @property {string|null} [guidance] ObservationDetails guidance + */ + + /** + * Constructs a new ObservationDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an ObservationDetails. + * @implements IObservationDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails=} [properties] Properties to set + */ + function ObservationDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ObservationDetails currentValue. + * @member {string} currentValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @instance + */ + ObservationDetails.prototype.currentValue = ""; + + /** + * ObservationDetails expectedValue. + * @member {string} expectedValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @instance + */ + ObservationDetails.prototype.expectedValue = ""; + + /** + * ObservationDetails guidance. + * @member {string} guidance + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @instance + */ + ObservationDetails.prototype.guidance = ""; + + /** + * Creates a new ObservationDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails instance + */ + ObservationDetails.create = function create(properties) { + return new ObservationDetails(properties); + }; + + /** + * Encodes the specified ObservationDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails} message ObservationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObservationDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentValue != null && Object.hasOwnProperty.call(message, "currentValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currentValue); + if (message.expectedValue != null && Object.hasOwnProperty.call(message, "expectedValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedValue); + if (message.guidance != null && Object.hasOwnProperty.call(message, "guidance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.guidance); + return writer; + }; + + /** + * Encodes the specified ObservationDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails} message ObservationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObservationDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ObservationDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObservationDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.currentValue = reader.string(); + break; + } + case 2: { + message.expectedValue = reader.string(); + break; + } + case 3: { + message.guidance = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ObservationDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObservationDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ObservationDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ObservationDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentValue != null && message.hasOwnProperty("currentValue")) + if (!$util.isString(message.currentValue)) + return "currentValue: string expected"; + if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) + if (!$util.isString(message.expectedValue)) + return "expectedValue: string expected"; + if (message.guidance != null && message.hasOwnProperty("guidance")) + if (!$util.isString(message.guidance)) + return "guidance: string expected"; + return null; + }; + + /** + * Creates an ObservationDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails + */ + ObservationDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails(); + if (object.currentValue != null) + message.currentValue = String(object.currentValue); + if (object.expectedValue != null) + message.expectedValue = String(object.expectedValue); + if (object.guidance != null) + message.guidance = String(object.guidance); + return message; + }; + + /** + * Creates a plain object from an ObservationDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} message ObservationDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ObservationDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currentValue = ""; + object.expectedValue = ""; + object.guidance = ""; + } + if (message.currentValue != null && message.hasOwnProperty("currentValue")) + object.currentValue = message.currentValue; + if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) + object.expectedValue = message.expectedValue; + if (message.guidance != null && message.hasOwnProperty("guidance")) + object.guidance = message.guidance; + return object; + }; + + /** + * Converts this ObservationDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @instance + * @returns {Object.} JSON object + */ + ObservationDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ObservationDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ObservationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ObservationDetails"; + }; + + return ObservationDetails; + })(); + + v1.EvidenceDetails = (function() { + + /** + * Properties of an EvidenceDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IEvidenceDetails + * @property {string|null} [resource] EvidenceDetails resource + * @property {string|null} [service] EvidenceDetails service + * @property {string|null} [evidencePath] EvidenceDetails evidencePath + */ + + /** + * Constructs a new EvidenceDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an EvidenceDetails. + * @implements IEvidenceDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails=} [properties] Properties to set + */ + function EvidenceDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceDetails resource. + * @member {string} resource + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @instance + */ + EvidenceDetails.prototype.resource = ""; + + /** + * EvidenceDetails service. + * @member {string} service + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @instance + */ + EvidenceDetails.prototype.service = ""; + + /** + * EvidenceDetails evidencePath. + * @member {string} evidencePath + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @instance + */ + EvidenceDetails.prototype.evidencePath = ""; + + /** + * Creates a new EvidenceDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails instance + */ + EvidenceDetails.create = function create(properties) { + return new EvidenceDetails(properties); + }; + + /** + * Encodes the specified EvidenceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails} message EvidenceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.evidencePath != null && Object.hasOwnProperty.call(message, "evidencePath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.evidencePath); + return writer; + }; + + /** + * Encodes the specified EvidenceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails} message EvidenceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.evidencePath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.evidencePath != null && message.hasOwnProperty("evidencePath")) + if (!$util.isString(message.evidencePath)) + return "evidencePath: string expected"; + return null; + }; + + /** + * Creates an EvidenceDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails + */ + EvidenceDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.service != null) + message.service = String(object.service); + if (object.evidencePath != null) + message.evidencePath = String(object.evidencePath); + return message; + }; + + /** + * Creates a plain object from an EvidenceDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} message EvidenceDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.service = ""; + object.evidencePath = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.evidencePath != null && message.hasOwnProperty("evidencePath")) + object.evidencePath = message.evidencePath; + return object; + }; + + /** + * Converts this EvidenceDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @instance + * @returns {Object.} JSON object + */ + EvidenceDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvidenceDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvidenceDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.EvidenceDetails"; + }; + + return EvidenceDetails; + })(); + + v1.CloudControlAuditDetails = (function() { + + /** + * Properties of a CloudControlAuditDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlAuditDetails + * @property {string|null} [cloudControl] CloudControlAuditDetails cloudControl + * @property {string|null} [cloudControlId] CloudControlAuditDetails cloudControlId + * @property {string|null} [cloudControlDescription] CloudControlAuditDetails cloudControlDescription + * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] CloudControlAuditDetails complianceState + * @property {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null} [reportSummary] CloudControlAuditDetails reportSummary + * @property {Array.|null} [findings] CloudControlAuditDetails findings + */ + + /** + * Constructs a new CloudControlAuditDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlAuditDetails. + * @implements ICloudControlAuditDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails=} [properties] Properties to set + */ + function CloudControlAuditDetails(properties) { + this.findings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlAuditDetails cloudControl. + * @member {string} cloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @instance + */ + CloudControlAuditDetails.prototype.cloudControl = ""; + + /** + * CloudControlAuditDetails cloudControlId. + * @member {string} cloudControlId + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @instance + */ + CloudControlAuditDetails.prototype.cloudControlId = ""; + + /** + * CloudControlAuditDetails cloudControlDescription. + * @member {string} cloudControlDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @instance + */ + CloudControlAuditDetails.prototype.cloudControlDescription = ""; + + /** + * CloudControlAuditDetails complianceState. + * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @instance + */ + CloudControlAuditDetails.prototype.complianceState = 0; + + /** + * CloudControlAuditDetails reportSummary. + * @member {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null|undefined} reportSummary + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @instance + */ + CloudControlAuditDetails.prototype.reportSummary = null; + + /** + * CloudControlAuditDetails findings. + * @member {Array.} findings + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @instance + */ + CloudControlAuditDetails.prototype.findings = $util.emptyArray; + + /** + * Creates a new CloudControlAuditDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails instance + */ + CloudControlAuditDetails.create = function create(properties) { + return new CloudControlAuditDetails(properties); + }; + + /** + * Encodes the specified CloudControlAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails} message CloudControlAuditDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlAuditDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControl); + if (message.cloudControlId != null && Object.hasOwnProperty.call(message, "cloudControlId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudControlId); + if (message.cloudControlDescription != null && Object.hasOwnProperty.call(message, "cloudControlDescription")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cloudControlDescription); + if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.complianceState); + if (message.reportSummary != null && Object.hasOwnProperty.call(message, "reportSummary")) + $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.encode(message.reportSummary, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.findings != null && message.findings.length) + for (var i = 0; i < message.findings.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.encode(message.findings[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudControlAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails} message CloudControlAuditDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlAuditDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlAuditDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlAuditDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cloudControl = reader.string(); + break; + } + case 2: { + message.cloudControlId = reader.string(); + break; + } + case 3: { + message.cloudControlDescription = reader.string(); + break; + } + case 4: { + message.complianceState = reader.int32(); + break; + } + case 5: { + message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.findings && message.findings.length)) + message.findings = []; + message.findings.push($root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlAuditDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlAuditDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlAuditDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlAuditDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) + if (!$util.isString(message.cloudControl)) + return "cloudControl: string expected"; + if (message.cloudControlId != null && message.hasOwnProperty("cloudControlId")) + if (!$util.isString(message.cloudControlId)) + return "cloudControlId: string expected"; + if (message.cloudControlDescription != null && message.hasOwnProperty("cloudControlDescription")) + if (!$util.isString(message.cloudControlDescription)) + return "cloudControlDescription: string expected"; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + switch (message.complianceState) { + default: + return "complianceState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify(message.reportSummary); + if (error) + return "reportSummary." + error; + } + if (message.findings != null && message.hasOwnProperty("findings")) { + if (!Array.isArray(message.findings)) + return "findings: array expected"; + for (var i = 0; i < message.findings.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify(message.findings[i]); + if (error) + return "findings." + error; + } + } + return null; + }; + + /** + * Creates a CloudControlAuditDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails + */ + CloudControlAuditDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails(); + if (object.cloudControl != null) + message.cloudControl = String(object.cloudControl); + if (object.cloudControlId != null) + message.cloudControlId = String(object.cloudControlId); + if (object.cloudControlDescription != null) + message.cloudControlDescription = String(object.cloudControlDescription); + switch (object.complianceState) { + default: + if (typeof object.complianceState === "number") { + message.complianceState = object.complianceState; + break; + } + break; + case "COMPLIANCE_STATE_UNSPECIFIED": + case 0: + message.complianceState = 0; + break; + case "COMPLIANT": + case 1: + message.complianceState = 1; + break; + case "VIOLATION": + case 2: + message.complianceState = 2; + break; + case "MANUAL_REVIEW_NEEDED": + case 3: + message.complianceState = 3; + break; + case "ERROR": + case 4: + message.complianceState = 4; + break; + case "AUDIT_NOT_SUPPORTED": + case 5: + message.complianceState = 5; + break; + } + if (object.reportSummary != null) { + if (typeof object.reportSummary !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.reportSummary: object expected"); + message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.fromObject(object.reportSummary); + } + if (object.findings) { + if (!Array.isArray(object.findings)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.findings: array expected"); + message.findings = []; + for (var i = 0; i < object.findings.length; ++i) { + if (typeof object.findings[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.findings: object expected"); + message.findings[i] = $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.fromObject(object.findings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CloudControlAuditDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} message CloudControlAuditDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlAuditDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.findings = []; + if (options.defaults) { + object.cloudControl = ""; + object.cloudControlId = ""; + object.cloudControlDescription = ""; + object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; + object.reportSummary = null; + } + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) + object.cloudControl = message.cloudControl; + if (message.cloudControlId != null && message.hasOwnProperty("cloudControlId")) + object.cloudControlId = message.cloudControlId; + if (message.cloudControlDescription != null && message.hasOwnProperty("cloudControlDescription")) + object.cloudControlDescription = message.cloudControlDescription; + if (message.complianceState != null && message.hasOwnProperty("complianceState")) + object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; + if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) + object.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.toObject(message.reportSummary, options); + if (message.findings && message.findings.length) { + object.findings = []; + for (var j = 0; j < message.findings.length; ++j) + object.findings[j] = $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.toObject(message.findings[j], options); + } + return object; + }; + + /** + * Converts this CloudControlAuditDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @instance + * @returns {Object.} JSON object + */ + CloudControlAuditDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlAuditDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlAuditDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails"; + }; + + return CloudControlAuditDetails; + })(); + + /** + * RegulatoryControlResponsibilityType enum. + * @name google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType + * @enum {number} + * @property {number} REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED=0 REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED value + * @property {number} GOOGLE=1 GOOGLE value + * @property {number} CUSTOMER=2 CUSTOMER value + * @property {number} SHARED=3 SHARED value + */ + v1.RegulatoryControlResponsibilityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE"] = 1; + values[valuesById[2] = "CUSTOMER"] = 2; + values[valuesById[3] = "SHARED"] = 3; + return values; + })(); + + /** + * EnforcementMode enum. + * @name google.cloud.cloudsecuritycompliance.v1.EnforcementMode + * @enum {number} + * @property {number} ENFORCEMENT_MODE_UNSPECIFIED=0 ENFORCEMENT_MODE_UNSPECIFIED value + * @property {number} PREVENTIVE=1 PREVENTIVE value + * @property {number} DETECTIVE=2 DETECTIVE value + * @property {number} AUDIT=3 AUDIT value + */ + v1.EnforcementMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCEMENT_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREVENTIVE"] = 1; + values[valuesById[2] = "DETECTIVE"] = 2; + values[valuesById[3] = "AUDIT"] = 3; + return values; + })(); + + /** + * FrameworkCategory enum. + * @name google.cloud.cloudsecuritycompliance.v1.FrameworkCategory + * @enum {number} + * @property {number} FRAMEWORK_CATEGORY_UNSPECIFIED=0 FRAMEWORK_CATEGORY_UNSPECIFIED value + * @property {number} INDUSTRY_DEFINED_STANDARD=1 INDUSTRY_DEFINED_STANDARD value + * @property {number} ASSURED_WORKLOADS=2 ASSURED_WORKLOADS value + * @property {number} DATA_SECURITY=3 DATA_SECURITY value + * @property {number} GOOGLE_BEST_PRACTICES=4 GOOGLE_BEST_PRACTICES value + * @property {number} CUSTOM_FRAMEWORK=5 CUSTOM_FRAMEWORK value + */ + v1.FrameworkCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FRAMEWORK_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INDUSTRY_DEFINED_STANDARD"] = 1; + values[valuesById[2] = "ASSURED_WORKLOADS"] = 2; + values[valuesById[3] = "DATA_SECURITY"] = 3; + values[valuesById[4] = "GOOGLE_BEST_PRACTICES"] = 4; + values[valuesById[5] = "CUSTOM_FRAMEWORK"] = 5; + return values; + })(); + + /** + * CloudControlCategory enum. + * @name google.cloud.cloudsecuritycompliance.v1.CloudControlCategory + * @enum {number} + * @property {number} CLOUD_CONTROL_CATEGORY_UNSPECIFIED=0 CLOUD_CONTROL_CATEGORY_UNSPECIFIED value + * @property {number} CC_CATEGORY_INFRASTRUCTURE=1 CC_CATEGORY_INFRASTRUCTURE value + * @property {number} CC_CATEGORY_ARTIFICIAL_INTELLIGENCE=2 CC_CATEGORY_ARTIFICIAL_INTELLIGENCE value + * @property {number} CC_CATEGORY_PHYSICAL_SECURITY=3 CC_CATEGORY_PHYSICAL_SECURITY value + * @property {number} CC_CATEGORY_DATA_SECURITY=4 CC_CATEGORY_DATA_SECURITY value + * @property {number} CC_CATEGORY_NETWORK_SECURITY=5 CC_CATEGORY_NETWORK_SECURITY value + * @property {number} CC_CATEGORY_INCIDENT_MANAGEMENT=6 CC_CATEGORY_INCIDENT_MANAGEMENT value + * @property {number} CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT=7 CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT value + * @property {number} CC_CATEGORY_ENCRYPTION=8 CC_CATEGORY_ENCRYPTION value + * @property {number} CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE=9 CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE value + * @property {number} CC_CATEGORY_HR_ADMIN_AND_PROCESSES=10 CC_CATEGORY_HR_ADMIN_AND_PROCESSES value + * @property {number} CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT=11 CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT value + * @property {number} CC_CATEGORY_LEGAL_AND_DISCLOSURES=12 CC_CATEGORY_LEGAL_AND_DISCLOSURES value + * @property {number} CC_CATEGORY_VULNERABILITY_MANAGEMENT=13 CC_CATEGORY_VULNERABILITY_MANAGEMENT value + * @property {number} CC_CATEGORY_PRIVACY=14 CC_CATEGORY_PRIVACY value + * @property {number} CC_CATEGORY_BCDR=15 CC_CATEGORY_BCDR value + * @property {number} CC_CATEGORY_ADMIN_ACCESS=16 CC_CATEGORY_ADMIN_ACCESS value + * @property {number} CC_CATEGORY_DATA_RESIDENCY=17 CC_CATEGORY_DATA_RESIDENCY value + * @property {number} CC_CATEGORY_RESOURCE_USAGE_RESTRICTION=18 CC_CATEGORY_RESOURCE_USAGE_RESTRICTION value + * @property {number} CC_CATEGORY_SERVICE_SPECIFIC=19 CC_CATEGORY_SERVICE_SPECIFIC value + */ + v1.CloudControlCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_CONTROL_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CC_CATEGORY_INFRASTRUCTURE"] = 1; + values[valuesById[2] = "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE"] = 2; + values[valuesById[3] = "CC_CATEGORY_PHYSICAL_SECURITY"] = 3; + values[valuesById[4] = "CC_CATEGORY_DATA_SECURITY"] = 4; + values[valuesById[5] = "CC_CATEGORY_NETWORK_SECURITY"] = 5; + values[valuesById[6] = "CC_CATEGORY_INCIDENT_MANAGEMENT"] = 6; + values[valuesById[7] = "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT"] = 7; + values[valuesById[8] = "CC_CATEGORY_ENCRYPTION"] = 8; + values[valuesById[9] = "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE"] = 9; + values[valuesById[10] = "CC_CATEGORY_HR_ADMIN_AND_PROCESSES"] = 10; + values[valuesById[11] = "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT"] = 11; + values[valuesById[12] = "CC_CATEGORY_LEGAL_AND_DISCLOSURES"] = 12; + values[valuesById[13] = "CC_CATEGORY_VULNERABILITY_MANAGEMENT"] = 13; + values[valuesById[14] = "CC_CATEGORY_PRIVACY"] = 14; + values[valuesById[15] = "CC_CATEGORY_BCDR"] = 15; + values[valuesById[16] = "CC_CATEGORY_ADMIN_ACCESS"] = 16; + values[valuesById[17] = "CC_CATEGORY_DATA_RESIDENCY"] = 17; + values[valuesById[18] = "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION"] = 18; + values[valuesById[19] = "CC_CATEGORY_SERVICE_SPECIFIC"] = 19; + return values; + })(); + + /** + * CloudProvider enum. + * @name google.cloud.cloudsecuritycompliance.v1.CloudProvider + * @enum {number} + * @property {number} CLOUD_PROVIDER_UNSPECIFIED=0 CLOUD_PROVIDER_UNSPECIFIED value + * @property {number} AWS=1 AWS value + * @property {number} AZURE=2 AZURE value + * @property {number} GCP=3 GCP value + */ + v1.CloudProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "AWS"] = 1; + values[valuesById[2] = "AZURE"] = 2; + values[valuesById[3] = "GCP"] = 3; + return values; + })(); + + /** + * Severity enum. + * @name google.cloud.cloudsecuritycompliance.v1.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} HIGH=2 HIGH value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LOW=4 LOW value + */ + v1.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "HIGH"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LOW"] = 4; + return values; + })(); + + /** + * RuleActionType enum. + * @name google.cloud.cloudsecuritycompliance.v1.RuleActionType + * @enum {number} + * @property {number} RULE_ACTION_TYPE_UNSPECIFIED=0 RULE_ACTION_TYPE_UNSPECIFIED value + * @property {number} RULE_ACTION_TYPE_PREVENTIVE=1 RULE_ACTION_TYPE_PREVENTIVE value + * @property {number} RULE_ACTION_TYPE_DETECTIVE=2 RULE_ACTION_TYPE_DETECTIVE value + * @property {number} RULE_ACTION_TYPE_AUDIT=3 RULE_ACTION_TYPE_AUDIT value + */ + v1.RuleActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RULE_ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RULE_ACTION_TYPE_PREVENTIVE"] = 1; + values[valuesById[2] = "RULE_ACTION_TYPE_DETECTIVE"] = 2; + values[valuesById[3] = "RULE_ACTION_TYPE_AUDIT"] = 3; + return values; + })(); + + /** + * TargetResourceType enum. + * @name google.cloud.cloudsecuritycompliance.v1.TargetResourceType + * @enum {number} + * @property {number} TARGET_RESOURCE_TYPE_UNSPECIFIED=0 TARGET_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} TARGET_RESOURCE_CRM_TYPE_ORG=1 TARGET_RESOURCE_CRM_TYPE_ORG value + * @property {number} TARGET_RESOURCE_CRM_TYPE_FOLDER=2 TARGET_RESOURCE_CRM_TYPE_FOLDER value + * @property {number} TARGET_RESOURCE_CRM_TYPE_PROJECT=3 TARGET_RESOURCE_CRM_TYPE_PROJECT value + * @property {number} TARGET_RESOURCE_TYPE_APPLICATION=4 TARGET_RESOURCE_TYPE_APPLICATION value + */ + v1.TargetResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TARGET_RESOURCE_CRM_TYPE_ORG"] = 1; + values[valuesById[2] = "TARGET_RESOURCE_CRM_TYPE_FOLDER"] = 2; + values[valuesById[3] = "TARGET_RESOURCE_CRM_TYPE_PROJECT"] = 3; + values[valuesById[4] = "TARGET_RESOURCE_TYPE_APPLICATION"] = 4; + return values; + })(); + + v1.Framework = (function() { + + /** + * Properties of a Framework. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFramework + * @property {string|null} [name] Framework name + * @property {number|Long|null} [majorRevisionId] Framework majorRevisionId + * @property {string|null} [displayName] Framework displayName + * @property {string|null} [description] Framework description + * @property {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null} [type] Framework type + * @property {Array.|null} [cloudControlDetails] Framework cloudControlDetails + * @property {Array.|null} [category] Framework category + * @property {Array.|null} [supportedCloudProviders] Framework supportedCloudProviders + * @property {Array.|null} [supportedTargetResourceTypes] Framework supportedTargetResourceTypes + * @property {Array.|null} [supportedEnforcementModes] Framework supportedEnforcementModes + */ + + /** + * Constructs a new Framework. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Framework. + * @implements IFramework + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFramework=} [properties] Properties to set + */ + function Framework(properties) { + this.cloudControlDetails = []; + this.category = []; + this.supportedCloudProviders = []; + this.supportedTargetResourceTypes = []; + this.supportedEnforcementModes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Framework name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.name = ""; + + /** + * Framework majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Framework displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.displayName = ""; + + /** + * Framework description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.description = ""; + + /** + * Framework type. + * @member {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType} type + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.type = 0; + + /** + * Framework cloudControlDetails. + * @member {Array.} cloudControlDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.cloudControlDetails = $util.emptyArray; + + /** + * Framework category. + * @member {Array.} category + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.category = $util.emptyArray; + + /** + * Framework supportedCloudProviders. + * @member {Array.} supportedCloudProviders + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.supportedCloudProviders = $util.emptyArray; + + /** + * Framework supportedTargetResourceTypes. + * @member {Array.} supportedTargetResourceTypes + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.supportedTargetResourceTypes = $util.emptyArray; + + /** + * Framework supportedEnforcementModes. + * @member {Array.} supportedEnforcementModes + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + */ + Framework.prototype.supportedEnforcementModes = $util.emptyArray; + + /** + * Creates a new Framework instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFramework=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework instance + */ + Framework.create = function create(properties) { + return new Framework(properties); + }; + + /** + * Encodes the specified Framework message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFramework} message Framework message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Framework.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.cloudControlDetails != null && message.cloudControlDetails.length) + for (var i = 0; i < message.cloudControlDetails.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.encode(message.cloudControlDetails[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.category != null && message.category.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.category.length; ++i) + writer.int32(message.category[i]); + writer.ldelim(); + } + if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + writer.int32(message.supportedCloudProviders[i]); + writer.ldelim(); + } + if (message.supportedTargetResourceTypes != null && message.supportedTargetResourceTypes.length) { + writer.uint32(/* id 11, wireType 2 =*/90).fork(); + for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) + writer.int32(message.supportedTargetResourceTypes[i]); + writer.ldelim(); + } + if (message.supportedEnforcementModes != null && message.supportedEnforcementModes.length) { + writer.uint32(/* id 13, wireType 2 =*/106).fork(); + for (var i = 0; i < message.supportedEnforcementModes.length; ++i) + writer.int32(message.supportedEnforcementModes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Framework message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFramework} message Framework message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Framework.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Framework message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Framework.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Framework(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.majorRevisionId = reader.int64(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 8: { + if (!(message.cloudControlDetails && message.cloudControlDetails.length)) + message.cloudControlDetails = []; + message.cloudControlDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.category && message.category.length)) + message.category = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.category.push(reader.int32()); + } else + message.category.push(reader.int32()); + break; + } + case 10: { + if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) + message.supportedCloudProviders = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedCloudProviders.push(reader.int32()); + } else + message.supportedCloudProviders.push(reader.int32()); + break; + } + case 11: { + if (!(message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length)) + message.supportedTargetResourceTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedTargetResourceTypes.push(reader.int32()); + } else + message.supportedTargetResourceTypes.push(reader.int32()); + break; + } + case 13: { + if (!(message.supportedEnforcementModes && message.supportedEnforcementModes.length)) + message.supportedEnforcementModes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedEnforcementModes.push(reader.int32()); + } else + message.supportedEnforcementModes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Framework message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Framework.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Framework message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Framework.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: 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.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) { + if (!Array.isArray(message.cloudControlDetails)) + return "cloudControlDetails: array expected"; + for (var i = 0; i < message.cloudControlDetails.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify(message.cloudControlDetails[i]); + if (error) + return "cloudControlDetails." + error; + } + } + if (message.category != null && message.hasOwnProperty("category")) { + if (!Array.isArray(message.category)) + return "category: array expected"; + for (var i = 0; i < message.category.length; ++i) + switch (message.category[i]) { + default: + return "category: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { + if (!Array.isArray(message.supportedCloudProviders)) + return "supportedCloudProviders: array expected"; + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + switch (message.supportedCloudProviders[i]) { + default: + return "supportedCloudProviders: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.supportedTargetResourceTypes != null && message.hasOwnProperty("supportedTargetResourceTypes")) { + if (!Array.isArray(message.supportedTargetResourceTypes)) + return "supportedTargetResourceTypes: array expected"; + for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) + switch (message.supportedTargetResourceTypes[i]) { + default: + return "supportedTargetResourceTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.supportedEnforcementModes != null && message.hasOwnProperty("supportedEnforcementModes")) { + if (!Array.isArray(message.supportedEnforcementModes)) + return "supportedEnforcementModes: array expected"; + for (var i = 0; i < message.supportedEnforcementModes.length; ++i) + switch (message.supportedEnforcementModes[i]) { + default: + return "supportedEnforcementModes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a Framework message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework + */ + Framework.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Framework) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Framework(); + if (object.name != null) + message.name = String(object.name); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FRAMEWORK_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BUILT_IN": + case 1: + message.type = 1; + break; + case "CUSTOM": + case 2: + message.type = 2; + break; + } + if (object.cloudControlDetails) { + if (!Array.isArray(object.cloudControlDetails)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.cloudControlDetails: array expected"); + message.cloudControlDetails = []; + for (var i = 0; i < object.cloudControlDetails.length; ++i) { + if (typeof object.cloudControlDetails[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.cloudControlDetails: object expected"); + message.cloudControlDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.fromObject(object.cloudControlDetails[i]); + } + } + if (object.category) { + if (!Array.isArray(object.category)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.category: array expected"); + message.category = []; + for (var i = 0; i < object.category.length; ++i) + switch (object.category[i]) { + default: + if (typeof object.category[i] === "number") { + message.category[i] = object.category[i]; + break; + } + case "FRAMEWORK_CATEGORY_UNSPECIFIED": + case 0: + message.category[i] = 0; + break; + case "INDUSTRY_DEFINED_STANDARD": + case 1: + message.category[i] = 1; + break; + case "ASSURED_WORKLOADS": + case 2: + message.category[i] = 2; + break; + case "DATA_SECURITY": + case 3: + message.category[i] = 3; + break; + case "GOOGLE_BEST_PRACTICES": + case 4: + message.category[i] = 4; + break; + case "CUSTOM_FRAMEWORK": + case 5: + message.category[i] = 5; + break; + } + } + if (object.supportedCloudProviders) { + if (!Array.isArray(object.supportedCloudProviders)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.supportedCloudProviders: array expected"); + message.supportedCloudProviders = []; + for (var i = 0; i < object.supportedCloudProviders.length; ++i) + switch (object.supportedCloudProviders[i]) { + default: + if (typeof object.supportedCloudProviders[i] === "number") { + message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; + break; + } + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.supportedCloudProviders[i] = 0; + break; + case "AWS": + case 1: + message.supportedCloudProviders[i] = 1; + break; + case "AZURE": + case 2: + message.supportedCloudProviders[i] = 2; + break; + case "GCP": + case 3: + message.supportedCloudProviders[i] = 3; + break; + } + } + if (object.supportedTargetResourceTypes) { + if (!Array.isArray(object.supportedTargetResourceTypes)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.supportedTargetResourceTypes: array expected"); + message.supportedTargetResourceTypes = []; + for (var i = 0; i < object.supportedTargetResourceTypes.length; ++i) + switch (object.supportedTargetResourceTypes[i]) { + default: + if (typeof object.supportedTargetResourceTypes[i] === "number") { + message.supportedTargetResourceTypes[i] = object.supportedTargetResourceTypes[i]; + break; + } + case "TARGET_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.supportedTargetResourceTypes[i] = 0; + break; + case "TARGET_RESOURCE_CRM_TYPE_ORG": + case 1: + message.supportedTargetResourceTypes[i] = 1; + break; + case "TARGET_RESOURCE_CRM_TYPE_FOLDER": + case 2: + message.supportedTargetResourceTypes[i] = 2; + break; + case "TARGET_RESOURCE_CRM_TYPE_PROJECT": + case 3: + message.supportedTargetResourceTypes[i] = 3; + break; + case "TARGET_RESOURCE_TYPE_APPLICATION": + case 4: + message.supportedTargetResourceTypes[i] = 4; + break; + } + } + if (object.supportedEnforcementModes) { + if (!Array.isArray(object.supportedEnforcementModes)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.supportedEnforcementModes: array expected"); + message.supportedEnforcementModes = []; + for (var i = 0; i < object.supportedEnforcementModes.length; ++i) + switch (object.supportedEnforcementModes[i]) { + default: + if (typeof object.supportedEnforcementModes[i] === "number") { + message.supportedEnforcementModes[i] = object.supportedEnforcementModes[i]; + break; + } + case "ENFORCEMENT_MODE_UNSPECIFIED": + case 0: + message.supportedEnforcementModes[i] = 0; + break; + case "PREVENTIVE": + case 1: + message.supportedEnforcementModes[i] = 1; + break; + case "DETECTIVE": + case 2: + message.supportedEnforcementModes[i] = 2; + break; + case "AUDIT": + case 3: + message.supportedEnforcementModes[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Framework message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Framework} message Framework + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Framework.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.cloudControlDetails = []; + object.category = []; + object.supportedCloudProviders = []; + object.supportedTargetResourceTypes = []; + object.supportedEnforcementModes = []; + } + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + object.displayName = ""; + object.description = ""; + object.type = options.enums === String ? "FRAMEWORK_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.type] === undefined ? message.type : $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.type] : message.type; + if (message.cloudControlDetails && message.cloudControlDetails.length) { + object.cloudControlDetails = []; + for (var j = 0; j < message.cloudControlDetails.length; ++j) + object.cloudControlDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.toObject(message.cloudControlDetails[j], options); + } + if (message.category && message.category.length) { + object.category = []; + for (var j = 0; j < message.category.length; ++j) + object.category[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.category[j]] === undefined ? message.category[j] : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.category[j]] : message.category[j]; + } + if (message.supportedCloudProviders && message.supportedCloudProviders.length) { + object.supportedCloudProviders = []; + for (var j = 0; j < message.supportedCloudProviders.length; ++j) + object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; + } + if (message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length) { + object.supportedTargetResourceTypes = []; + for (var j = 0; j < message.supportedTargetResourceTypes.length; ++j) + object.supportedTargetResourceTypes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] === undefined ? message.supportedTargetResourceTypes[j] : $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] : message.supportedTargetResourceTypes[j]; + } + if (message.supportedEnforcementModes && message.supportedEnforcementModes.length) { + object.supportedEnforcementModes = []; + for (var j = 0; j < message.supportedEnforcementModes.length; ++j) + object.supportedEnforcementModes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] === undefined ? message.supportedEnforcementModes[j] : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] : message.supportedEnforcementModes[j]; + } + return object; + }; + + /** + * Converts this Framework to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @instance + * @returns {Object.} JSON object + */ + Framework.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Framework + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Framework + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Framework.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Framework"; + }; + + /** + * FrameworkType enum. + * @name google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType + * @enum {number} + * @property {number} FRAMEWORK_TYPE_UNSPECIFIED=0 FRAMEWORK_TYPE_UNSPECIFIED value + * @property {number} BUILT_IN=1 BUILT_IN value + * @property {number} CUSTOM=2 CUSTOM value + */ + Framework.FrameworkType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FRAMEWORK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BUILT_IN"] = 1; + values[valuesById[2] = "CUSTOM"] = 2; + return values; + })(); + + return Framework; + })(); + + v1.CloudControlDetails = (function() { + + /** + * Properties of a CloudControlDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlDetails + * @property {string|null} [name] CloudControlDetails name + * @property {number|Long|null} [majorRevisionId] CloudControlDetails majorRevisionId + * @property {Array.|null} [parameters] CloudControlDetails parameters + */ + + /** + * Constructs a new CloudControlDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlDetails. + * @implements ICloudControlDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails=} [properties] Properties to set + */ + function CloudControlDetails(properties) { + this.parameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlDetails name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @instance + */ + CloudControlDetails.prototype.name = ""; + + /** + * CloudControlDetails majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @instance + */ + CloudControlDetails.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CloudControlDetails parameters. + * @member {Array.} parameters + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @instance + */ + CloudControlDetails.prototype.parameters = $util.emptyArray; + + /** + * Creates a new CloudControlDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails instance + */ + CloudControlDetails.create = function create(properties) { + return new CloudControlDetails(properties); + }; + + /** + * Encodes the specified CloudControlDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails} message CloudControlDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlDetails.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.Parameter.encode(message.parameters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudControlDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails} message CloudControlDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.majorRevisionId = reader.int64(); + break; + } + case 4: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.cloudsecuritycompliance.v1.Parameter.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlDetails.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } + return null; + }; + + /** + * Creates a CloudControlDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails + */ + CloudControlDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails(); + if (object.name != null) + message.name = String(object.name); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.parameters: object expected"); + message.parameters[i] = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.fromObject(object.parameters[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CloudControlDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} message CloudControlDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameters = []; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.toObject(message.parameters[j], options); + } + return object; + }; + + /** + * Converts this CloudControlDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @instance + * @returns {Object.} JSON object + */ + CloudControlDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlDetails"; + }; + + return CloudControlDetails; + })(); + + v1.FrameworkReference = (function() { + + /** + * Properties of a FrameworkReference. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFrameworkReference + * @property {string|null} [framework] FrameworkReference framework + * @property {number|Long|null} [majorRevisionId] FrameworkReference majorRevisionId + */ + + /** + * Constructs a new FrameworkReference. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FrameworkReference. + * @implements IFrameworkReference + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference=} [properties] Properties to set + */ + function FrameworkReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FrameworkReference framework. + * @member {string} framework + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @instance + */ + FrameworkReference.prototype.framework = ""; + + /** + * FrameworkReference majorRevisionId. + * @member {number|Long|null|undefined} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @instance + */ + FrameworkReference.prototype.majorRevisionId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FrameworkReference.prototype, "_majorRevisionId", { + get: $util.oneOfGetter($oneOfFields = ["majorRevisionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FrameworkReference instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference instance + */ + FrameworkReference.create = function create(properties) { + return new FrameworkReference(properties); + }; + + /** + * Encodes the specified FrameworkReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference} message FrameworkReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); + if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); + return writer; + }; + + /** + * Encodes the specified FrameworkReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference} message FrameworkReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrameworkReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.framework = reader.string(); + break; + } + case 2: { + message.majorRevisionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrameworkReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrameworkReference message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrameworkReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.framework != null && message.hasOwnProperty("framework")) + if (!$util.isString(message.framework)) + return "framework: string expected"; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) { + properties._majorRevisionId = 1; + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FrameworkReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference + */ + FrameworkReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference(); + if (object.framework != null) + message.framework = String(object.framework); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FrameworkReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} message FrameworkReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrameworkReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.framework = ""; + if (message.framework != null && message.hasOwnProperty("framework")) + object.framework = message.framework; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) { + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (options.oneofs) + object._majorRevisionId = "majorRevisionId"; + } + return object; + }; + + /** + * Converts this FrameworkReference to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @instance + * @returns {Object.} JSON object + */ + FrameworkReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrameworkReference + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrameworkReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkReference"; + }; + + return FrameworkReference; + })(); + + v1.Parameter = (function() { + + /** + * Properties of a Parameter. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IParameter + * @property {string|null} [name] Parameter name + * @property {google.cloud.cloudsecuritycompliance.v1.IParamValue|null} [parameterValue] Parameter parameterValue + */ + + /** + * Constructs a new Parameter. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IParameter=} [properties] Properties to set + */ + function Parameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Parameter name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @instance + */ + Parameter.prototype.name = ""; + + /** + * Parameter parameterValue. + * @member {google.cloud.cloudsecuritycompliance.v1.IParamValue|null|undefined} parameterValue + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @instance + */ + Parameter.prototype.parameterValue = null; + + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameter=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter instance + */ + Parameter.create = function create(properties) { + return new Parameter(properties); + }; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.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.parameterValue != null && Object.hasOwnProperty.call(message, "parameterValue")) + $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.encode(message.parameterValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Parameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.parameterValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Parameter message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Parameter.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.parameterValue != null && message.hasOwnProperty("parameterValue")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.verify(message.parameterValue); + if (error) + return "parameterValue." + error; + } + return null; + }; + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Parameter) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Parameter(); + if (object.name != null) + message.name = String(object.name); + if (object.parameterValue != null) { + if (typeof object.parameterValue !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Parameter.parameterValue: object expected"); + message.parameterValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.fromObject(object.parameterValue); + } + return message; + }; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Parameter} message Parameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Parameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.parameterValue = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parameterValue != null && message.hasOwnProperty("parameterValue")) + object.parameterValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.toObject(message.parameterValue, options); + return object; + }; + + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @instance + * @returns {Object.} JSON object + */ + Parameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Parameter + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Parameter"; + }; + + return Parameter; + })(); + + v1.CloudControl = (function() { + + /** + * Properties of a CloudControl. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControl + * @property {string|null} [name] CloudControl name + * @property {number|Long|null} [majorRevisionId] CloudControl majorRevisionId + * @property {string|null} [description] CloudControl description + * @property {string|null} [displayName] CloudControl displayName + * @property {Array.|null} [supportedEnforcementModes] CloudControl supportedEnforcementModes + * @property {Array.|null} [parameterSpec] CloudControl parameterSpec + * @property {Array.|null} [rules] CloudControl rules + * @property {google.cloud.cloudsecuritycompliance.v1.Severity|null} [severity] CloudControl severity + * @property {string|null} [findingCategory] CloudControl findingCategory + * @property {Array.|null} [supportedCloudProviders] CloudControl supportedCloudProviders + * @property {Array.|null} [relatedFrameworks] CloudControl relatedFrameworks + * @property {string|null} [remediationSteps] CloudControl remediationSteps + * @property {Array.|null} [categories] CloudControl categories + * @property {google.protobuf.ITimestamp|null} [createTime] CloudControl createTime + * @property {Array.|null} [supportedTargetResourceTypes] CloudControl supportedTargetResourceTypes + */ + + /** + * Constructs a new CloudControl. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControl. + * @implements ICloudControl + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl=} [properties] Properties to set + */ + function CloudControl(properties) { + this.supportedEnforcementModes = []; + this.parameterSpec = []; + this.rules = []; + this.supportedCloudProviders = []; + this.relatedFrameworks = []; + this.categories = []; + this.supportedTargetResourceTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControl name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.name = ""; + + /** + * CloudControl majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CloudControl description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.description = ""; + + /** + * CloudControl displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.displayName = ""; + + /** + * CloudControl supportedEnforcementModes. + * @member {Array.} supportedEnforcementModes + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.supportedEnforcementModes = $util.emptyArray; + + /** + * CloudControl parameterSpec. + * @member {Array.} parameterSpec + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.parameterSpec = $util.emptyArray; + + /** + * CloudControl rules. + * @member {Array.} rules + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.rules = $util.emptyArray; + + /** + * CloudControl severity. + * @member {google.cloud.cloudsecuritycompliance.v1.Severity} severity + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.severity = 0; + + /** + * CloudControl findingCategory. + * @member {string} findingCategory + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.findingCategory = ""; + + /** + * CloudControl supportedCloudProviders. + * @member {Array.} supportedCloudProviders + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.supportedCloudProviders = $util.emptyArray; + + /** + * CloudControl relatedFrameworks. + * @member {Array.} relatedFrameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.relatedFrameworks = $util.emptyArray; + + /** + * CloudControl remediationSteps. + * @member {string} remediationSteps + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.remediationSteps = ""; + + /** + * CloudControl categories. + * @member {Array.} categories + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.categories = $util.emptyArray; + + /** + * CloudControl createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.createTime = null; + + /** + * CloudControl supportedTargetResourceTypes. + * @member {Array.} supportedTargetResourceTypes + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + */ + CloudControl.prototype.supportedTargetResourceTypes = $util.emptyArray; + + /** + * Creates a new CloudControl instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl instance + */ + CloudControl.create = function create(properties) { + return new CloudControl(properties); + }; + + /** + * Encodes the specified CloudControl message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl} message CloudControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControl.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.supportedEnforcementModes != null && message.supportedEnforcementModes.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.supportedEnforcementModes.length; ++i) + writer.int32(message.supportedEnforcementModes[i]); + writer.ldelim(); + } + if (message.parameterSpec != null && message.parameterSpec.length) + for (var i = 0; i < message.parameterSpec.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.encode(message.parameterSpec[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.Rule.encode(message.rules[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.severity); + if (message.findingCategory != null && Object.hasOwnProperty.call(message, "findingCategory")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.findingCategory); + if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { + writer.uint32(/* id 13, wireType 2 =*/106).fork(); + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + writer.int32(message.supportedCloudProviders[i]); + writer.ldelim(); + } + if (message.relatedFrameworks != null && message.relatedFrameworks.length) + for (var i = 0; i < message.relatedFrameworks.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.relatedFrameworks[i]); + if (message.remediationSteps != null && Object.hasOwnProperty.call(message, "remediationSteps")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.remediationSteps); + if (message.categories != null && message.categories.length) { + writer.uint32(/* id 16, wireType 2 =*/130).fork(); + for (var i = 0; i < message.categories.length; ++i) + writer.int32(message.categories[i]); + writer.ldelim(); + } + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.supportedTargetResourceTypes != null && message.supportedTargetResourceTypes.length) { + writer.uint32(/* id 18, wireType 2 =*/146).fork(); + for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) + writer.int32(message.supportedTargetResourceTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CloudControl message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl} message CloudControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControl.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControl message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControl.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControl(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.majorRevisionId = reader.int64(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 7: { + if (!(message.supportedEnforcementModes && message.supportedEnforcementModes.length)) + message.supportedEnforcementModes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedEnforcementModes.push(reader.int32()); + } else + message.supportedEnforcementModes.push(reader.int32()); + break; + } + case 8: { + if (!(message.parameterSpec && message.parameterSpec.length)) + message.parameterSpec = []; + message.parameterSpec.push($root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.cloudsecuritycompliance.v1.Rule.decode(reader, reader.uint32())); + break; + } + case 11: { + message.severity = reader.int32(); + break; + } + case 12: { + message.findingCategory = reader.string(); + break; + } + case 13: { + if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) + message.supportedCloudProviders = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedCloudProviders.push(reader.int32()); + } else + message.supportedCloudProviders.push(reader.int32()); + break; + } + case 14: { + if (!(message.relatedFrameworks && message.relatedFrameworks.length)) + message.relatedFrameworks = []; + message.relatedFrameworks.push(reader.string()); + break; + } + case 15: { + message.remediationSteps = reader.string(); + break; + } + case 16: { + if (!(message.categories && message.categories.length)) + message.categories = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.categories.push(reader.int32()); + } else + message.categories.push(reader.int32()); + break; + } + case 17: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length)) + message.supportedTargetResourceTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedTargetResourceTypes.push(reader.int32()); + } else + message.supportedTargetResourceTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControl message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControl.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControl message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControl.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.supportedEnforcementModes != null && message.hasOwnProperty("supportedEnforcementModes")) { + if (!Array.isArray(message.supportedEnforcementModes)) + return "supportedEnforcementModes: array expected"; + for (var i = 0; i < message.supportedEnforcementModes.length; ++i) + switch (message.supportedEnforcementModes[i]) { + default: + return "supportedEnforcementModes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.parameterSpec != null && message.hasOwnProperty("parameterSpec")) { + if (!Array.isArray(message.parameterSpec)) + return "parameterSpec: array expected"; + for (var i = 0; i < message.parameterSpec.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify(message.parameterSpec[i]); + if (error) + return "parameterSpec." + error; + } + } + 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.cloud.cloudsecuritycompliance.v1.Rule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + if (!$util.isString(message.findingCategory)) + return "findingCategory: string expected"; + if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { + if (!Array.isArray(message.supportedCloudProviders)) + return "supportedCloudProviders: array expected"; + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + switch (message.supportedCloudProviders[i]) { + default: + return "supportedCloudProviders: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.relatedFrameworks != null && message.hasOwnProperty("relatedFrameworks")) { + if (!Array.isArray(message.relatedFrameworks)) + return "relatedFrameworks: array expected"; + for (var i = 0; i < message.relatedFrameworks.length; ++i) + if (!$util.isString(message.relatedFrameworks[i])) + return "relatedFrameworks: string[] expected"; + } + if (message.remediationSteps != null && message.hasOwnProperty("remediationSteps")) + if (!$util.isString(message.remediationSteps)) + return "remediationSteps: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) + switch (message.categories[i]) { + default: + return "categories: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + break; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.supportedTargetResourceTypes != null && message.hasOwnProperty("supportedTargetResourceTypes")) { + if (!Array.isArray(message.supportedTargetResourceTypes)) + return "supportedTargetResourceTypes: array expected"; + for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) + switch (message.supportedTargetResourceTypes[i]) { + default: + return "supportedTargetResourceTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + return null; + }; + + /** + * Creates a CloudControl message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl + */ + CloudControl.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControl) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControl(); + if (object.name != null) + message.name = String(object.name); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.supportedEnforcementModes) { + if (!Array.isArray(object.supportedEnforcementModes)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.supportedEnforcementModes: array expected"); + message.supportedEnforcementModes = []; + for (var i = 0; i < object.supportedEnforcementModes.length; ++i) + switch (object.supportedEnforcementModes[i]) { + default: + if (typeof object.supportedEnforcementModes[i] === "number") { + message.supportedEnforcementModes[i] = object.supportedEnforcementModes[i]; + break; + } + case "ENFORCEMENT_MODE_UNSPECIFIED": + case 0: + message.supportedEnforcementModes[i] = 0; + break; + case "PREVENTIVE": + case 1: + message.supportedEnforcementModes[i] = 1; + break; + case "DETECTIVE": + case 2: + message.supportedEnforcementModes[i] = 2; + break; + case "AUDIT": + case 3: + message.supportedEnforcementModes[i] = 3; + break; + } + } + if (object.parameterSpec) { + if (!Array.isArray(object.parameterSpec)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.parameterSpec: array expected"); + message.parameterSpec = []; + for (var i = 0; i < object.parameterSpec.length; ++i) { + if (typeof object.parameterSpec[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.parameterSpec: object expected"); + message.parameterSpec[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.fromObject(object.parameterSpec[i]); + } + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.rules: object expected"); + message.rules[i] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.fromObject(object.rules[i]); + } + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "CRITICAL": + case 1: + message.severity = 1; + break; + case "HIGH": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "LOW": + case 4: + message.severity = 4; + break; + } + if (object.findingCategory != null) + message.findingCategory = String(object.findingCategory); + if (object.supportedCloudProviders) { + if (!Array.isArray(object.supportedCloudProviders)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.supportedCloudProviders: array expected"); + message.supportedCloudProviders = []; + for (var i = 0; i < object.supportedCloudProviders.length; ++i) + switch (object.supportedCloudProviders[i]) { + default: + if (typeof object.supportedCloudProviders[i] === "number") { + message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; + break; + } + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.supportedCloudProviders[i] = 0; + break; + case "AWS": + case 1: + message.supportedCloudProviders[i] = 1; + break; + case "AZURE": + case 2: + message.supportedCloudProviders[i] = 2; + break; + case "GCP": + case 3: + message.supportedCloudProviders[i] = 3; + break; + } + } + if (object.relatedFrameworks) { + if (!Array.isArray(object.relatedFrameworks)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.relatedFrameworks: array expected"); + message.relatedFrameworks = []; + for (var i = 0; i < object.relatedFrameworks.length; ++i) + message.relatedFrameworks[i] = String(object.relatedFrameworks[i]); + } + if (object.remediationSteps != null) + message.remediationSteps = String(object.remediationSteps); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) + switch (object.categories[i]) { + default: + if (typeof object.categories[i] === "number") { + message.categories[i] = object.categories[i]; + break; + } + case "CLOUD_CONTROL_CATEGORY_UNSPECIFIED": + case 0: + message.categories[i] = 0; + break; + case "CC_CATEGORY_INFRASTRUCTURE": + case 1: + message.categories[i] = 1; + break; + case "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE": + case 2: + message.categories[i] = 2; + break; + case "CC_CATEGORY_PHYSICAL_SECURITY": + case 3: + message.categories[i] = 3; + break; + case "CC_CATEGORY_DATA_SECURITY": + case 4: + message.categories[i] = 4; + break; + case "CC_CATEGORY_NETWORK_SECURITY": + case 5: + message.categories[i] = 5; + break; + case "CC_CATEGORY_INCIDENT_MANAGEMENT": + case 6: + message.categories[i] = 6; + break; + case "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT": + case 7: + message.categories[i] = 7; + break; + case "CC_CATEGORY_ENCRYPTION": + case 8: + message.categories[i] = 8; + break; + case "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE": + case 9: + message.categories[i] = 9; + break; + case "CC_CATEGORY_HR_ADMIN_AND_PROCESSES": + case 10: + message.categories[i] = 10; + break; + case "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT": + case 11: + message.categories[i] = 11; + break; + case "CC_CATEGORY_LEGAL_AND_DISCLOSURES": + case 12: + message.categories[i] = 12; + break; + case "CC_CATEGORY_VULNERABILITY_MANAGEMENT": + case 13: + message.categories[i] = 13; + break; + case "CC_CATEGORY_PRIVACY": + case 14: + message.categories[i] = 14; + break; + case "CC_CATEGORY_BCDR": + case 15: + message.categories[i] = 15; + break; + case "CC_CATEGORY_ADMIN_ACCESS": + case 16: + message.categories[i] = 16; + break; + case "CC_CATEGORY_DATA_RESIDENCY": + case 17: + message.categories[i] = 17; + break; + case "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION": + case 18: + message.categories[i] = 18; + break; + case "CC_CATEGORY_SERVICE_SPECIFIC": + case 19: + message.categories[i] = 19; + break; + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.supportedTargetResourceTypes) { + if (!Array.isArray(object.supportedTargetResourceTypes)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.supportedTargetResourceTypes: array expected"); + message.supportedTargetResourceTypes = []; + for (var i = 0; i < object.supportedTargetResourceTypes.length; ++i) + switch (object.supportedTargetResourceTypes[i]) { + default: + if (typeof object.supportedTargetResourceTypes[i] === "number") { + message.supportedTargetResourceTypes[i] = object.supportedTargetResourceTypes[i]; + break; + } + case "TARGET_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.supportedTargetResourceTypes[i] = 0; + break; + case "TARGET_RESOURCE_CRM_TYPE_ORG": + case 1: + message.supportedTargetResourceTypes[i] = 1; + break; + case "TARGET_RESOURCE_CRM_TYPE_FOLDER": + case 2: + message.supportedTargetResourceTypes[i] = 2; + break; + case "TARGET_RESOURCE_CRM_TYPE_PROJECT": + case 3: + message.supportedTargetResourceTypes[i] = 3; + break; + case "TARGET_RESOURCE_TYPE_APPLICATION": + case 4: + message.supportedTargetResourceTypes[i] = 4; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CloudControl message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} message CloudControl + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControl.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.supportedEnforcementModes = []; + object.parameterSpec = []; + object.rules = []; + object.supportedCloudProviders = []; + object.relatedFrameworks = []; + object.categories = []; + object.supportedTargetResourceTypes = []; + } + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + object.description = ""; + object.displayName = ""; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.findingCategory = ""; + object.remediationSteps = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.supportedEnforcementModes && message.supportedEnforcementModes.length) { + object.supportedEnforcementModes = []; + for (var j = 0; j < message.supportedEnforcementModes.length; ++j) + object.supportedEnforcementModes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] === undefined ? message.supportedEnforcementModes[j] : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] : message.supportedEnforcementModes[j]; + } + if (message.parameterSpec && message.parameterSpec.length) { + object.parameterSpec = []; + for (var j = 0; j < message.parameterSpec.length; ++j) + object.parameterSpec[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.toObject(message.parameterSpec[j], options); + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.toObject(message.rules[j], options); + } + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] : message.severity; + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + object.findingCategory = message.findingCategory; + if (message.supportedCloudProviders && message.supportedCloudProviders.length) { + object.supportedCloudProviders = []; + for (var j = 0; j < message.supportedCloudProviders.length; ++j) + object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; + } + if (message.relatedFrameworks && message.relatedFrameworks.length) { + object.relatedFrameworks = []; + for (var j = 0; j < message.relatedFrameworks.length; ++j) + object.relatedFrameworks[j] = message.relatedFrameworks[j]; + } + if (message.remediationSteps != null && message.hasOwnProperty("remediationSteps")) + object.remediationSteps = message.remediationSteps; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[message.categories[j]] === undefined ? message.categories[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[message.categories[j]] : message.categories[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length) { + object.supportedTargetResourceTypes = []; + for (var j = 0; j < message.supportedTargetResourceTypes.length; ++j) + object.supportedTargetResourceTypes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] === undefined ? message.supportedTargetResourceTypes[j] : $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] : message.supportedTargetResourceTypes[j]; + } + return object; + }; + + /** + * Converts this CloudControl to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @instance + * @returns {Object.} JSON object + */ + CloudControl.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControl + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControl"; + }; + + /** + * Type enum. + * @name google.cloud.cloudsecuritycompliance.v1.CloudControl.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CUSTOM=1 CUSTOM value + * @property {number} BUILT_IN=2 BUILT_IN value + */ + CloudControl.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CUSTOM"] = 1; + values[valuesById[2] = "BUILT_IN"] = 2; + return values; + })(); + + return CloudControl; + })(); + + v1.ParameterSpec = (function() { + + /** + * Properties of a ParameterSpec. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IParameterSpec + * @property {string|null} [name] ParameterSpec name + * @property {string|null} [displayName] ParameterSpec displayName + * @property {string|null} [description] ParameterSpec description + * @property {boolean|null} [isRequired] ParameterSpec isRequired + * @property {google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|null} [valueType] ParameterSpec valueType + * @property {google.cloud.cloudsecuritycompliance.v1.IParamValue|null} [defaultValue] ParameterSpec defaultValue + * @property {Array.|null} [substitutionRules] ParameterSpec substitutionRules + * @property {Array.|null} [subParameters] ParameterSpec subParameters + * @property {google.cloud.cloudsecuritycompliance.v1.IValidation|null} [validation] ParameterSpec validation + */ + + /** + * Constructs a new ParameterSpec. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ParameterSpec. + * @implements IParameterSpec + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec=} [properties] Properties to set + */ + function ParameterSpec(properties) { + this.substitutionRules = []; + this.subParameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParameterSpec name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.name = ""; + + /** + * ParameterSpec displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.displayName = ""; + + /** + * ParameterSpec description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.description = ""; + + /** + * ParameterSpec isRequired. + * @member {boolean} isRequired + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.isRequired = false; + + /** + * ParameterSpec valueType. + * @member {google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType} valueType + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.valueType = 0; + + /** + * ParameterSpec defaultValue. + * @member {google.cloud.cloudsecuritycompliance.v1.IParamValue|null|undefined} defaultValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.defaultValue = null; + + /** + * ParameterSpec substitutionRules. + * @member {Array.} substitutionRules + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.substitutionRules = $util.emptyArray; + + /** + * ParameterSpec subParameters. + * @member {Array.} subParameters + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.subParameters = $util.emptyArray; + + /** + * ParameterSpec validation. + * @member {google.cloud.cloudsecuritycompliance.v1.IValidation|null|undefined} validation + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + */ + ParameterSpec.prototype.validation = null; + + /** + * Creates a new ParameterSpec instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec instance + */ + ParameterSpec.create = function create(properties) { + return new ParameterSpec(properties); + }; + + /** + * Encodes the specified ParameterSpec message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec} message ParameterSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterSpec.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.isRequired != null && Object.hasOwnProperty.call(message, "isRequired")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isRequired); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.valueType); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.encode(message.defaultValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.substitutionRules != null && message.substitutionRules.length) + for (var i = 0; i < message.substitutionRules.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.encode(message.substitutionRules[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.subParameters != null && message.subParameters.length) + for (var i = 0; i < message.subParameters.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.encode(message.subParameters[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.validation != null && Object.hasOwnProperty.call(message, "validation")) + $root.google.cloud.cloudsecuritycompliance.v1.Validation.encode(message.validation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ParameterSpec message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec} message ParameterSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParameterSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.isRequired = reader.bool(); + break; + } + case 5: { + message.valueType = reader.int32(); + break; + } + case 6: { + message.defaultValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.substitutionRules && message.substitutionRules.length)) + message.substitutionRules = []; + message.substitutionRules.push($root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.subParameters && message.subParameters.length)) + message.subParameters = []; + message.subParameters.push($root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.decode(reader, reader.uint32())); + break; + } + case 9: { + message.validation = $root.google.cloud.cloudsecuritycompliance.v1.Validation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParameterSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParameterSpec message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParameterSpec.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.isRequired != null && message.hasOwnProperty("isRequired")) + if (typeof message.isRequired !== "boolean") + return "isRequired: boolean expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.verify(message.defaultValue); + if (error) + return "defaultValue." + error; + } + if (message.substitutionRules != null && message.hasOwnProperty("substitutionRules")) { + if (!Array.isArray(message.substitutionRules)) + return "substitutionRules: array expected"; + for (var i = 0; i < message.substitutionRules.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify(message.substitutionRules[i]); + if (error) + return "substitutionRules." + error; + } + } + if (message.subParameters != null && message.hasOwnProperty("subParameters")) { + if (!Array.isArray(message.subParameters)) + return "subParameters: array expected"; + for (var i = 0; i < message.subParameters.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify(message.subParameters[i]); + if (error) + return "subParameters." + error; + } + } + if (message.validation != null && message.hasOwnProperty("validation")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Validation.verify(message.validation); + if (error) + return "validation." + error; + } + return null; + }; + + /** + * Creates a ParameterSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec + */ + ParameterSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.isRequired != null) + message.isRequired = Boolean(object.isRequired); + switch (object.valueType) { + default: + if (typeof object.valueType === "number") { + message.valueType = object.valueType; + break; + } + break; + case "VALUE_TYPE_UNSPECIFIED": + case 0: + message.valueType = 0; + break; + case "STRING": + case 3: + message.valueType = 3; + break; + case "BOOLEAN": + case 4: + message.valueType = 4; + break; + case "STRINGLIST": + case 5: + message.valueType = 5; + break; + case "NUMBER": + case 6: + message.valueType = 6; + break; + case "ONEOF": + case 7: + message.valueType = 7; + break; + } + if (object.defaultValue != null) { + if (typeof object.defaultValue !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.defaultValue: object expected"); + message.defaultValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.fromObject(object.defaultValue); + } + if (object.substitutionRules) { + if (!Array.isArray(object.substitutionRules)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.substitutionRules: array expected"); + message.substitutionRules = []; + for (var i = 0; i < object.substitutionRules.length; ++i) { + if (typeof object.substitutionRules[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.substitutionRules: object expected"); + message.substitutionRules[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.fromObject(object.substitutionRules[i]); + } + } + if (object.subParameters) { + if (!Array.isArray(object.subParameters)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.subParameters: array expected"); + message.subParameters = []; + for (var i = 0; i < object.subParameters.length; ++i) { + if (typeof object.subParameters[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.subParameters: object expected"); + message.subParameters[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.fromObject(object.subParameters[i]); + } + } + if (object.validation != null) { + if (typeof object.validation !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.validation: object expected"); + message.validation = $root.google.cloud.cloudsecuritycompliance.v1.Validation.fromObject(object.validation); + } + return message; + }; + + /** + * Creates a plain object from a ParameterSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} message ParameterSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParameterSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.substitutionRules = []; + object.subParameters = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.isRequired = false; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.defaultValue = null; + object.validation = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.isRequired != null && message.hasOwnProperty("isRequired")) + object.isRequired = message.isRequired; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType[message.valueType] === undefined ? message.valueType : $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType[message.valueType] : message.valueType; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.toObject(message.defaultValue, options); + if (message.substitutionRules && message.substitutionRules.length) { + object.substitutionRules = []; + for (var j = 0; j < message.substitutionRules.length; ++j) + object.substitutionRules[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.toObject(message.substitutionRules[j], options); + } + if (message.subParameters && message.subParameters.length) { + object.subParameters = []; + for (var j = 0; j < message.subParameters.length; ++j) + object.subParameters[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.toObject(message.subParameters[j], options); + } + if (message.validation != null && message.hasOwnProperty("validation")) + object.validation = $root.google.cloud.cloudsecuritycompliance.v1.Validation.toObject(message.validation, options); + return object; + }; + + /** + * Converts this ParameterSpec to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @instance + * @returns {Object.} JSON object + */ + ParameterSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParameterSpec + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParameterSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ParameterSpec"; + }; + + /** + * ValueType enum. + * @name google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} STRING=3 STRING value + * @property {number} BOOLEAN=4 BOOLEAN value + * @property {number} STRINGLIST=5 STRINGLIST value + * @property {number} NUMBER=6 NUMBER value + * @property {number} ONEOF=7 ONEOF value + */ + ParameterSpec.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[3] = "STRING"] = 3; + values[valuesById[4] = "BOOLEAN"] = 4; + values[valuesById[5] = "STRINGLIST"] = 5; + values[valuesById[6] = "NUMBER"] = 6; + values[valuesById[7] = "ONEOF"] = 7; + return values; + })(); + + return ParameterSpec; + })(); + + v1.Validation = (function() { + + /** + * Properties of a Validation. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IValidation + * @property {google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null} [allowedValues] Validation allowedValues + * @property {google.cloud.cloudsecuritycompliance.v1.IIntRange|null} [intRange] Validation intRange + * @property {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null} [regexpPattern] Validation regexpPattern + */ + + /** + * Constructs a new Validation. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Validation. + * @implements IValidation + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IValidation=} [properties] Properties to set + */ + function Validation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validation allowedValues. + * @member {google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null|undefined} allowedValues + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @instance + */ + Validation.prototype.allowedValues = null; + + /** + * Validation intRange. + * @member {google.cloud.cloudsecuritycompliance.v1.IIntRange|null|undefined} intRange + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @instance + */ + Validation.prototype.intRange = null; + + /** + * Validation regexpPattern. + * @member {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null|undefined} regexpPattern + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @instance + */ + Validation.prototype.regexpPattern = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Validation constraint. + * @member {"allowedValues"|"intRange"|"regexpPattern"|undefined} constraint + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @instance + */ + Object.defineProperty(Validation.prototype, "constraint", { + get: $util.oneOfGetter($oneOfFields = ["allowedValues", "intRange", "regexpPattern"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Validation instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IValidation=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation instance + */ + Validation.create = function create(properties) { + return new Validation(properties); + }; + + /** + * Encodes the specified Validation message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IValidation} message Validation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedValues != null && Object.hasOwnProperty.call(message, "allowedValues")) + $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.encode(message.allowedValues, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.intRange != null && Object.hasOwnProperty.call(message, "intRange")) + $root.google.cloud.cloudsecuritycompliance.v1.IntRange.encode(message.intRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.regexpPattern != null && Object.hasOwnProperty.call(message, "regexpPattern")) + $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.encode(message.regexpPattern, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IValidation} message Validation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Validation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.allowedValues = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.decode(reader, reader.uint32()); + break; + } + case 2: { + message.intRange = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.decode(reader, reader.uint32()); + break; + } + case 3: { + message.regexpPattern = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validation message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { + properties.constraint = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify(message.allowedValues); + if (error) + return "allowedValues." + error; + } + } + if (message.intRange != null && message.hasOwnProperty("intRange")) { + if (properties.constraint === 1) + return "constraint: multiple values"; + properties.constraint = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.verify(message.intRange); + if (error) + return "intRange." + error; + } + } + if (message.regexpPattern != null && message.hasOwnProperty("regexpPattern")) { + if (properties.constraint === 1) + return "constraint: multiple values"; + properties.constraint = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify(message.regexpPattern); + if (error) + return "regexpPattern." + error; + } + } + return null; + }; + + /** + * Creates a Validation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation + */ + Validation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Validation) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Validation(); + if (object.allowedValues != null) { + if (typeof object.allowedValues !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Validation.allowedValues: object expected"); + message.allowedValues = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.fromObject(object.allowedValues); + } + if (object.intRange != null) { + if (typeof object.intRange !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Validation.intRange: object expected"); + message.intRange = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.fromObject(object.intRange); + } + if (object.regexpPattern != null) { + if (typeof object.regexpPattern !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Validation.regexpPattern: object expected"); + message.regexpPattern = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.fromObject(object.regexpPattern); + } + return message; + }; + + /** + * Creates a plain object from a Validation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Validation} message Validation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { + object.allowedValues = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.toObject(message.allowedValues, options); + if (options.oneofs) + object.constraint = "allowedValues"; + } + if (message.intRange != null && message.hasOwnProperty("intRange")) { + object.intRange = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.toObject(message.intRange, options); + if (options.oneofs) + object.constraint = "intRange"; + } + if (message.regexpPattern != null && message.hasOwnProperty("regexpPattern")) { + object.regexpPattern = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.toObject(message.regexpPattern, options); + if (options.oneofs) + object.constraint = "regexpPattern"; + } + return object; + }; + + /** + * Converts this Validation to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @instance + * @returns {Object.} JSON object + */ + Validation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Validation + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Validation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Validation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Validation"; + }; + + return Validation; + })(); + + v1.AllowedValues = (function() { + + /** + * Properties of an AllowedValues. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IAllowedValues + * @property {Array.|null} [values] AllowedValues values + */ + + /** + * Constructs a new AllowedValues. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an AllowedValues. + * @implements IAllowedValues + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues=} [properties] Properties to set + */ + function AllowedValues(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedValues values. + * @member {Array.} values + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @instance + */ + AllowedValues.prototype.values = $util.emptyArray; + + /** + * Creates a new AllowedValues instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues instance + */ + AllowedValues.create = function create(properties) { + return new AllowedValues(properties); + }; + + /** + * Encodes the specified AllowedValues message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues} message AllowedValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedValues.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AllowedValues message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues} message AllowedValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedValues.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedValues message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedValues.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.cloud.cloudsecuritycompliance.v1.ParamValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedValues message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedValues.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedValues message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedValues.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates an AllowedValues message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues + */ + AllowedValues.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AllowedValues.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AllowedValues.values: object expected"); + message.values[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AllowedValues message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AllowedValues} message AllowedValues + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedValues.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this AllowedValues to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @instance + * @returns {Object.} JSON object + */ + AllowedValues.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllowedValues + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AllowedValues"; + }; + + return AllowedValues; + })(); + + v1.RegexpPattern = (function() { + + /** + * Properties of a RegexpPattern. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IRegexpPattern + * @property {string|null} [pattern] RegexpPattern pattern + */ + + /** + * Constructs a new RegexpPattern. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a RegexpPattern. + * @implements IRegexpPattern + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern=} [properties] Properties to set + */ + function RegexpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegexpPattern pattern. + * @member {string} pattern + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @instance + */ + RegexpPattern.prototype.pattern = ""; + + /** + * Creates a new RegexpPattern instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern instance + */ + RegexpPattern.create = function create(properties) { + return new RegexpPattern(properties); + }; + + /** + * Encodes the specified RegexpPattern message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern} message RegexpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegexpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pattern); + return writer; + }; + + /** + * Encodes the specified RegexpPattern message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern} message RegexpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegexpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegexpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegexpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pattern = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RegexpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegexpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegexpPattern message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegexpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) + if (!$util.isString(message.pattern)) + return "pattern: string expected"; + return null; + }; + + /** + * Creates a RegexpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern + */ + RegexpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern(); + if (object.pattern != null) + message.pattern = String(object.pattern); + return message; + }; + + /** + * Creates a plain object from a RegexpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} message RegexpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegexpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pattern = ""; + if (message.pattern != null && message.hasOwnProperty("pattern")) + object.pattern = message.pattern; + return object; + }; + + /** + * Converts this RegexpPattern to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @instance + * @returns {Object.} JSON object + */ + RegexpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegexpPattern + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegexpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.RegexpPattern"; + }; + + return RegexpPattern; + })(); + + v1.IntRange = (function() { + + /** + * Properties of an IntRange. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IIntRange + * @property {number|Long|null} [min] IntRange min + * @property {number|Long|null} [max] IntRange max + */ + + /** + * Constructs a new IntRange. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an IntRange. + * @implements IIntRange + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange=} [properties] Properties to set + */ + function IntRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntRange min. + * @member {number|Long} min + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @instance + */ + IntRange.prototype.min = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IntRange max. + * @member {number|Long} max + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @instance + */ + IntRange.prototype.max = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IntRange instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange instance + */ + IntRange.create = function create(properties) { + return new IntRange(properties); + }; + + /** + * Encodes the specified IntRange message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange} message IntRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.max); + return writer; + }; + + /** + * Encodes the specified IntRange message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange} message IntRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.IntRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.min = reader.int64(); + break; + } + case 2: { + message.max = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntRange message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (!$util.isInteger(message.min) && !(message.min && $util.isInteger(message.min.low) && $util.isInteger(message.min.high))) + return "min: integer|Long expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (!$util.isInteger(message.max) && !(message.max && $util.isInteger(message.max.low) && $util.isInteger(message.max.high))) + return "max: integer|Long expected"; + return null; + }; + + /** + * Creates an IntRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange + */ + IntRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.IntRange) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.IntRange(); + if (object.min != null) + if ($util.Long) + (message.min = $util.Long.fromValue(object.min)).unsigned = false; + else if (typeof object.min === "string") + message.min = parseInt(object.min, 10); + else if (typeof object.min === "number") + message.min = object.min; + else if (typeof object.min === "object") + message.min = new $util.LongBits(object.min.low >>> 0, object.min.high >>> 0).toNumber(); + if (object.max != null) + if ($util.Long) + (message.max = $util.Long.fromValue(object.max)).unsigned = false; + else if (typeof object.max === "string") + message.max = parseInt(object.max, 10); + else if (typeof object.max === "number") + message.max = object.max; + else if (typeof object.max === "object") + message.max = new $util.LongBits(object.max.low >>> 0, object.max.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IntRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IntRange} message IntRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntRange.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.min = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.min = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.max = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max = options.longs === String ? "0" : 0; + } + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min === "number") + object.min = options.longs === String ? String(message.min) : message.min; + else + object.min = options.longs === String ? $util.Long.prototype.toString.call(message.min) : options.longs === Number ? new $util.LongBits(message.min.low >>> 0, message.min.high >>> 0).toNumber() : message.min; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max === "number") + object.max = options.longs === String ? String(message.max) : message.max; + else + object.max = options.longs === String ? $util.Long.prototype.toString.call(message.max) : options.longs === Number ? new $util.LongBits(message.max.low >>> 0, message.max.high >>> 0).toNumber() : message.max; + return object; + }; + + /** + * Converts this IntRange to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @instance + * @returns {Object.} JSON object + */ + IntRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntRange + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.IntRange"; + }; + + return IntRange; + })(); + + v1.StringList = (function() { + + /** + * Properties of a StringList. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IStringList + * @property {Array.|null} [values] StringList values + */ + + /** + * Constructs a new StringList. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a StringList. + * @implements IStringList + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IStringList=} [properties] Properties to set + */ + function StringList(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringList values. + * @member {Array.} values + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @instance + */ + StringList.prototype.values = $util.emptyArray; + + /** + * Creates a new StringList instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IStringList=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList instance + */ + StringList.create = function create(properties) { + return new StringList(properties); + }; + + /** + * Encodes the specified StringList message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IStringList} message StringList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IStringList} message StringList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringList message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringList.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.StringList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringList message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a StringList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList + */ + StringList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.StringList) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.StringList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.StringList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a StringList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.StringList} message StringList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this StringList to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @instance + * @returns {Object.} JSON object + */ + StringList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringList + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.StringList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.StringList"; + }; + + return StringList; + })(); + + v1.ParamValue = (function() { + + /** + * Properties of a ParamValue. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IParamValue + * @property {string|null} [stringValue] ParamValue stringValue + * @property {boolean|null} [boolValue] ParamValue boolValue + * @property {google.cloud.cloudsecuritycompliance.v1.IStringList|null} [stringListValue] ParamValue stringListValue + * @property {number|null} [numberValue] ParamValue numberValue + * @property {google.cloud.cloudsecuritycompliance.v1.IParameter|null} [oneofValue] ParamValue oneofValue + */ + + /** + * Constructs a new ParamValue. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ParamValue. + * @implements IParamValue + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue=} [properties] Properties to set + */ + function ParamValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParamValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @instance + */ + ParamValue.prototype.stringValue = null; + + /** + * ParamValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @instance + */ + ParamValue.prototype.boolValue = null; + + /** + * ParamValue stringListValue. + * @member {google.cloud.cloudsecuritycompliance.v1.IStringList|null|undefined} stringListValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @instance + */ + ParamValue.prototype.stringListValue = null; + + /** + * ParamValue numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @instance + */ + ParamValue.prototype.numberValue = null; + + /** + * ParamValue oneofValue. + * @member {google.cloud.cloudsecuritycompliance.v1.IParameter|null|undefined} oneofValue + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @instance + */ + ParamValue.prototype.oneofValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ParamValue kind. + * @member {"stringValue"|"boolValue"|"stringListValue"|"numberValue"|"oneofValue"|undefined} kind + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @instance + */ + Object.defineProperty(ParamValue.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "boolValue", "stringListValue", "numberValue", "oneofValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ParamValue instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue instance + */ + ParamValue.create = function create(properties) { + return new ParamValue(properties); + }; + + /** + * Encodes the specified ParamValue message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue} message ParamValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParamValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.stringListValue != null && Object.hasOwnProperty.call(message, "stringListValue")) + $root.google.cloud.cloudsecuritycompliance.v1.StringList.encode(message.stringListValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.numberValue); + if (message.oneofValue != null && Object.hasOwnProperty.call(message, "oneofValue")) + $root.google.cloud.cloudsecuritycompliance.v1.Parameter.encode(message.oneofValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ParamValue message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue} message ParamValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParamValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParamValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParamValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ParamValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.stringListValue = $root.google.cloud.cloudsecuritycompliance.v1.StringList.decode(reader, reader.uint32()); + break; + } + case 6: { + message.numberValue = reader.double(); + break; + } + case 7: { + message.oneofValue = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParamValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParamValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParamValue message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParamValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.StringList.verify(message.stringListValue); + if (error) + return "stringListValue." + error; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.oneofValue != null && message.hasOwnProperty("oneofValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.verify(message.oneofValue); + if (error) + return "oneofValue." + error; + } + } + return null; + }; + + /** + * Creates a ParamValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue + */ + ParamValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ParamValue) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ParamValue(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.stringListValue != null) { + if (typeof object.stringListValue !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParamValue.stringListValue: object expected"); + message.stringListValue = $root.google.cloud.cloudsecuritycompliance.v1.StringList.fromObject(object.stringListValue); + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.oneofValue != null) { + if (typeof object.oneofValue !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParamValue.oneofValue: object expected"); + message.oneofValue = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.fromObject(object.oneofValue); + } + return message; + }; + + /** + * Creates a plain object from a ParamValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ParamValue} message ParamValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParamValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { + object.stringListValue = $root.google.cloud.cloudsecuritycompliance.v1.StringList.toObject(message.stringListValue, options); + if (options.oneofs) + object.kind = "stringListValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.oneofValue != null && message.hasOwnProperty("oneofValue")) { + object.oneofValue = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.toObject(message.oneofValue, options); + if (options.oneofs) + object.kind = "oneofValue"; + } + return object; + }; + + /** + * Converts this ParamValue to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @instance + * @returns {Object.} JSON object + */ + ParamValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParamValue + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParamValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ParamValue"; + }; + + return ParamValue; + })(); + + v1.ParameterSubstitutionRule = (function() { + + /** + * Properties of a ParameterSubstitutionRule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IParameterSubstitutionRule + * @property {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null} [placeholderSubstitutionRule] ParameterSubstitutionRule placeholderSubstitutionRule + * @property {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null} [attributeSubstitutionRule] ParameterSubstitutionRule attributeSubstitutionRule + */ + + /** + * Constructs a new ParameterSubstitutionRule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ParameterSubstitutionRule. + * @implements IParameterSubstitutionRule + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule=} [properties] Properties to set + */ + function ParameterSubstitutionRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParameterSubstitutionRule placeholderSubstitutionRule. + * @member {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null|undefined} placeholderSubstitutionRule + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @instance + */ + ParameterSubstitutionRule.prototype.placeholderSubstitutionRule = null; + + /** + * ParameterSubstitutionRule attributeSubstitutionRule. + * @member {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null|undefined} attributeSubstitutionRule + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @instance + */ + ParameterSubstitutionRule.prototype.attributeSubstitutionRule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ParameterSubstitutionRule substitutionType. + * @member {"placeholderSubstitutionRule"|"attributeSubstitutionRule"|undefined} substitutionType + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @instance + */ + Object.defineProperty(ParameterSubstitutionRule.prototype, "substitutionType", { + get: $util.oneOfGetter($oneOfFields = ["placeholderSubstitutionRule", "attributeSubstitutionRule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ParameterSubstitutionRule instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule instance + */ + ParameterSubstitutionRule.create = function create(properties) { + return new ParameterSubstitutionRule(properties); + }; + + /** + * Encodes the specified ParameterSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule} message ParameterSubstitutionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterSubstitutionRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placeholderSubstitutionRule != null && Object.hasOwnProperty.call(message, "placeholderSubstitutionRule")) + $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.encode(message.placeholderSubstitutionRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.attributeSubstitutionRule != null && Object.hasOwnProperty.call(message, "attributeSubstitutionRule")) + $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.encode(message.attributeSubstitutionRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ParameterSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule} message ParameterSubstitutionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterSubstitutionRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParameterSubstitutionRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterSubstitutionRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.placeholderSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.decode(reader, reader.uint32()); + break; + } + case 2: { + message.attributeSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParameterSubstitutionRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterSubstitutionRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParameterSubstitutionRule message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParameterSubstitutionRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.placeholderSubstitutionRule != null && message.hasOwnProperty("placeholderSubstitutionRule")) { + properties.substitutionType = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify(message.placeholderSubstitutionRule); + if (error) + return "placeholderSubstitutionRule." + error; + } + } + if (message.attributeSubstitutionRule != null && message.hasOwnProperty("attributeSubstitutionRule")) { + if (properties.substitutionType === 1) + return "substitutionType: multiple values"; + properties.substitutionType = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify(message.attributeSubstitutionRule); + if (error) + return "attributeSubstitutionRule." + error; + } + } + return null; + }; + + /** + * Creates a ParameterSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule + */ + ParameterSubstitutionRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule(); + if (object.placeholderSubstitutionRule != null) { + if (typeof object.placeholderSubstitutionRule !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.placeholderSubstitutionRule: object expected"); + message.placeholderSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.fromObject(object.placeholderSubstitutionRule); + } + if (object.attributeSubstitutionRule != null) { + if (typeof object.attributeSubstitutionRule !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.attributeSubstitutionRule: object expected"); + message.attributeSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.fromObject(object.attributeSubstitutionRule); + } + return message; + }; + + /** + * Creates a plain object from a ParameterSubstitutionRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} message ParameterSubstitutionRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParameterSubstitutionRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.placeholderSubstitutionRule != null && message.hasOwnProperty("placeholderSubstitutionRule")) { + object.placeholderSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.toObject(message.placeholderSubstitutionRule, options); + if (options.oneofs) + object.substitutionType = "placeholderSubstitutionRule"; + } + if (message.attributeSubstitutionRule != null && message.hasOwnProperty("attributeSubstitutionRule")) { + object.attributeSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.toObject(message.attributeSubstitutionRule, options); + if (options.oneofs) + object.substitutionType = "attributeSubstitutionRule"; + } + return object; + }; + + /** + * Converts this ParameterSubstitutionRule to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @instance + * @returns {Object.} JSON object + */ + ParameterSubstitutionRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParameterSubstitutionRule + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParameterSubstitutionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule"; + }; + + return ParameterSubstitutionRule; + })(); + + v1.AttributeSubstitutionRule = (function() { + + /** + * Properties of an AttributeSubstitutionRule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IAttributeSubstitutionRule + * @property {string|null} [attribute] AttributeSubstitutionRule attribute + */ + + /** + * Constructs a new AttributeSubstitutionRule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an AttributeSubstitutionRule. + * @implements IAttributeSubstitutionRule + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule=} [properties] Properties to set + */ + function AttributeSubstitutionRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttributeSubstitutionRule attribute. + * @member {string} attribute + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @instance + */ + AttributeSubstitutionRule.prototype.attribute = ""; + + /** + * Creates a new AttributeSubstitutionRule instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule instance + */ + AttributeSubstitutionRule.create = function create(properties) { + return new AttributeSubstitutionRule(properties); + }; + + /** + * Encodes the specified AttributeSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule} message AttributeSubstitutionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributeSubstitutionRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.attribute); + return writer; + }; + + /** + * Encodes the specified AttributeSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule} message AttributeSubstitutionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributeSubstitutionRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttributeSubstitutionRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributeSubstitutionRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.attribute = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttributeSubstitutionRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributeSubstitutionRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttributeSubstitutionRule message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttributeSubstitutionRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attribute != null && message.hasOwnProperty("attribute")) + if (!$util.isString(message.attribute)) + return "attribute: string expected"; + return null; + }; + + /** + * Creates an AttributeSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule + */ + AttributeSubstitutionRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule(); + if (object.attribute != null) + message.attribute = String(object.attribute); + return message; + }; + + /** + * Creates a plain object from an AttributeSubstitutionRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} message AttributeSubstitutionRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttributeSubstitutionRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.attribute = ""; + if (message.attribute != null && message.hasOwnProperty("attribute")) + object.attribute = message.attribute; + return object; + }; + + /** + * Converts this AttributeSubstitutionRule to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @instance + * @returns {Object.} JSON object + */ + AttributeSubstitutionRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttributeSubstitutionRule + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttributeSubstitutionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule"; + }; + + return AttributeSubstitutionRule; + })(); + + v1.PlaceholderSubstitutionRule = (function() { + + /** + * Properties of a PlaceholderSubstitutionRule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IPlaceholderSubstitutionRule + * @property {string|null} [attribute] PlaceholderSubstitutionRule attribute + */ + + /** + * Constructs a new PlaceholderSubstitutionRule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a PlaceholderSubstitutionRule. + * @implements IPlaceholderSubstitutionRule + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule=} [properties] Properties to set + */ + function PlaceholderSubstitutionRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceholderSubstitutionRule attribute. + * @member {string} attribute + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @instance + */ + PlaceholderSubstitutionRule.prototype.attribute = ""; + + /** + * Creates a new PlaceholderSubstitutionRule instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule instance + */ + PlaceholderSubstitutionRule.create = function create(properties) { + return new PlaceholderSubstitutionRule(properties); + }; + + /** + * Encodes the specified PlaceholderSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule} message PlaceholderSubstitutionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceholderSubstitutionRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.attribute); + return writer; + }; + + /** + * Encodes the specified PlaceholderSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule} message PlaceholderSubstitutionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceholderSubstitutionRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceholderSubstitutionRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.attribute = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceholderSubstitutionRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceholderSubstitutionRule message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceholderSubstitutionRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attribute != null && message.hasOwnProperty("attribute")) + if (!$util.isString(message.attribute)) + return "attribute: string expected"; + return null; + }; + + /** + * Creates a PlaceholderSubstitutionRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule + */ + PlaceholderSubstitutionRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule(); + if (object.attribute != null) + message.attribute = String(object.attribute); + return message; + }; + + /** + * Creates a plain object from a PlaceholderSubstitutionRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} message PlaceholderSubstitutionRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceholderSubstitutionRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.attribute = ""; + if (message.attribute != null && message.hasOwnProperty("attribute")) + object.attribute = message.attribute; + return object; + }; + + /** + * Converts this PlaceholderSubstitutionRule to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @instance + * @returns {Object.} JSON object + */ + PlaceholderSubstitutionRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceholderSubstitutionRule + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceholderSubstitutionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule"; + }; + + return PlaceholderSubstitutionRule; + })(); + + v1.Rule = (function() { + + /** + * Properties of a Rule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IRule + * @property {google.cloud.cloudsecuritycompliance.v1.ICELExpression|null} [celExpression] Rule celExpression + * @property {string|null} [description] Rule description + * @property {Array.|null} [ruleActionTypes] Rule ruleActionTypes + */ + + /** + * Constructs a new Rule. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Rule. + * @implements IRule + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IRule=} [properties] Properties to set + */ + function Rule(properties) { + this.ruleActionTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rule celExpression. + * @member {google.cloud.cloudsecuritycompliance.v1.ICELExpression|null|undefined} celExpression + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @instance + */ + Rule.prototype.celExpression = null; + + /** + * Rule description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @instance + */ + Rule.prototype.description = ""; + + /** + * Rule ruleActionTypes. + * @member {Array.} ruleActionTypes + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @instance + */ + Rule.prototype.ruleActionTypes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Rule implementation. + * @member {"celExpression"|undefined} implementation + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @instance + */ + Object.defineProperty(Rule.prototype, "implementation", { + get: $util.oneOfGetter($oneOfFields = ["celExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Rule instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IRule=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule instance + */ + Rule.create = function create(properties) { + return new Rule(properties); + }; + + /** + * Encodes the specified Rule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.celExpression != null && Object.hasOwnProperty.call(message, "celExpression")) + $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.encode(message.celExpression, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.description); + if (message.ruleActionTypes != null && message.ruleActionTypes.length) { + writer.uint32(/* id 16, wireType 2 =*/130).fork(); + for (var i = 0; i < message.ruleActionTypes.length; ++i) + writer.int32(message.ruleActionTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Rule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.celExpression = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.decode(reader, reader.uint32()); + break; + } + case 10: { + message.description = reader.string(); + break; + } + case 16: { + if (!(message.ruleActionTypes && message.ruleActionTypes.length)) + message.ruleActionTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ruleActionTypes.push(reader.int32()); + } else + message.ruleActionTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rule message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.celExpression != null && message.hasOwnProperty("celExpression")) { + properties.implementation = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.verify(message.celExpression); + if (error) + return "celExpression." + error; + } + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.ruleActionTypes != null && message.hasOwnProperty("ruleActionTypes")) { + if (!Array.isArray(message.ruleActionTypes)) + return "ruleActionTypes: array expected"; + for (var i = 0; i < message.ruleActionTypes.length; ++i) + switch (message.ruleActionTypes[i]) { + default: + return "ruleActionTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a Rule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule + */ + Rule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Rule) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Rule(); + if (object.celExpression != null) { + if (typeof object.celExpression !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Rule.celExpression: object expected"); + message.celExpression = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.fromObject(object.celExpression); + } + if (object.description != null) + message.description = String(object.description); + if (object.ruleActionTypes) { + if (!Array.isArray(object.ruleActionTypes)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Rule.ruleActionTypes: array expected"); + message.ruleActionTypes = []; + for (var i = 0; i < object.ruleActionTypes.length; ++i) + switch (object.ruleActionTypes[i]) { + default: + if (typeof object.ruleActionTypes[i] === "number") { + message.ruleActionTypes[i] = object.ruleActionTypes[i]; + break; + } + case "RULE_ACTION_TYPE_UNSPECIFIED": + case 0: + message.ruleActionTypes[i] = 0; + break; + case "RULE_ACTION_TYPE_PREVENTIVE": + case 1: + message.ruleActionTypes[i] = 1; + break; + case "RULE_ACTION_TYPE_DETECTIVE": + case 2: + message.ruleActionTypes[i] = 2; + break; + case "RULE_ACTION_TYPE_AUDIT": + case 3: + message.ruleActionTypes[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Rule} message Rule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ruleActionTypes = []; + if (options.defaults) + object.description = ""; + if (message.celExpression != null && message.hasOwnProperty("celExpression")) { + object.celExpression = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.toObject(message.celExpression, options); + if (options.oneofs) + object.implementation = "celExpression"; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.ruleActionTypes && message.ruleActionTypes.length) { + object.ruleActionTypes = []; + for (var j = 0; j < message.ruleActionTypes.length; ++j) + object.ruleActionTypes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.RuleActionType[message.ruleActionTypes[j]] === undefined ? message.ruleActionTypes[j] : $root.google.cloud.cloudsecuritycompliance.v1.RuleActionType[message.ruleActionTypes[j]] : message.ruleActionTypes[j]; + } + return object; + }; + + /** + * Converts this Rule to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @instance + * @returns {Object.} JSON object + */ + Rule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rule + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Rule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Rule"; + }; + + return Rule; + })(); + + v1.CELExpression = (function() { + + /** + * Properties of a CELExpression. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICELExpression + * @property {google.cloud.cloudsecuritycompliance.v1.IStringList|null} [resourceTypesValues] CELExpression resourceTypesValues + * @property {string|null} [expression] CELExpression expression + */ + + /** + * Constructs a new CELExpression. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CELExpression. + * @implements ICELExpression + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression=} [properties] Properties to set + */ + function CELExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CELExpression resourceTypesValues. + * @member {google.cloud.cloudsecuritycompliance.v1.IStringList|null|undefined} resourceTypesValues + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @instance + */ + CELExpression.prototype.resourceTypesValues = null; + + /** + * CELExpression expression. + * @member {string} expression + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @instance + */ + CELExpression.prototype.expression = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CELExpression criteria. + * @member {"resourceTypesValues"|undefined} criteria + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @instance + */ + Object.defineProperty(CELExpression.prototype, "criteria", { + get: $util.oneOfGetter($oneOfFields = ["resourceTypesValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CELExpression instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression instance + */ + CELExpression.create = function create(properties) { + return new CELExpression(properties); + }; + + /** + * Encodes the specified CELExpression message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression} message CELExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CELExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.resourceTypesValues != null && Object.hasOwnProperty.call(message, "resourceTypesValues")) + $root.google.cloud.cloudsecuritycompliance.v1.StringList.encode(message.resourceTypesValues, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CELExpression message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression} message CELExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CELExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CELExpression message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CELExpression.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CELExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.resourceTypesValues = $root.google.cloud.cloudsecuritycompliance.v1.StringList.decode(reader, reader.uint32()); + break; + } + case 1: { + message.expression = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CELExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CELExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CELExpression message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CELExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.resourceTypesValues != null && message.hasOwnProperty("resourceTypesValues")) { + properties.criteria = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.StringList.verify(message.resourceTypesValues); + if (error) + return "resourceTypesValues." + error; + } + } + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + return null; + }; + + /** + * Creates a CELExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression + */ + CELExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CELExpression) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CELExpression(); + if (object.resourceTypesValues != null) { + if (typeof object.resourceTypesValues !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CELExpression.resourceTypesValues: object expected"); + message.resourceTypesValues = $root.google.cloud.cloudsecuritycompliance.v1.StringList.fromObject(object.resourceTypesValues); + } + if (object.expression != null) + message.expression = String(object.expression); + return message; + }; + + /** + * Creates a plain object from a CELExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CELExpression} message CELExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CELExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expression = ""; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.resourceTypesValues != null && message.hasOwnProperty("resourceTypesValues")) { + object.resourceTypesValues = $root.google.cloud.cloudsecuritycompliance.v1.StringList.toObject(message.resourceTypesValues, options); + if (options.oneofs) + object.criteria = "resourceTypesValues"; + } + return object; + }; + + /** + * Converts this CELExpression to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @instance + * @returns {Object.} JSON object + */ + CELExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CELExpression + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CELExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CELExpression"; + }; + + return CELExpression; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.cloudsecuritycompliance.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.Control = (function() { + + /** + * Properties of a Control. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IControl + * @property {string|null} [name] Control name + * @property {string|null} [displayName] Control displayName + * @property {string|null} [description] Control description + * @property {google.cloud.cloudsecuritycompliance.v1.Control.Family|null} [family] Control family + * @property {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null} [controlFamily] Control controlFamily + * @property {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null} [responsibilityType] Control responsibilityType + * @property {string|null} [googleResponsibilityDescription] Control googleResponsibilityDescription + * @property {string|null} [googleResponsibilityImplementation] Control googleResponsibilityImplementation + * @property {string|null} [customerResponsibilityDescription] Control customerResponsibilityDescription + * @property {string|null} [customerResponsibilityImplementation] Control customerResponsibilityImplementation + * @property {string|null} [sharedResponsibilityDescription] Control sharedResponsibilityDescription + * @property {string|null} [additionalContentUri] Control additionalContentUri + * @property {Array.|null} [relatedFrameworks] Control relatedFrameworks + */ + + /** + * Constructs a new Control. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Control. + * @implements IControl + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IControl=} [properties] Properties to set + */ + function Control(properties) { + this.relatedFrameworks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Control name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.name = ""; + + /** + * Control displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.displayName = ""; + + /** + * Control description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.description = ""; + + /** + * Control family. + * @member {google.cloud.cloudsecuritycompliance.v1.Control.Family} family + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.family = 0; + + /** + * Control controlFamily. + * @member {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null|undefined} controlFamily + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.controlFamily = null; + + /** + * Control responsibilityType. + * @member {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType} responsibilityType + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.responsibilityType = 0; + + /** + * Control googleResponsibilityDescription. + * @member {string} googleResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.googleResponsibilityDescription = ""; + + /** + * Control googleResponsibilityImplementation. + * @member {string} googleResponsibilityImplementation + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.googleResponsibilityImplementation = ""; + + /** + * Control customerResponsibilityDescription. + * @member {string} customerResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.customerResponsibilityDescription = ""; + + /** + * Control customerResponsibilityImplementation. + * @member {string} customerResponsibilityImplementation + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.customerResponsibilityImplementation = ""; + + /** + * Control sharedResponsibilityDescription. + * @member {string} sharedResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.sharedResponsibilityDescription = ""; + + /** + * Control additionalContentUri. + * @member {string} additionalContentUri + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.additionalContentUri = ""; + + /** + * Control relatedFrameworks. + * @member {Array.} relatedFrameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.relatedFrameworks = $util.emptyArray; + + /** + * Creates a new Control instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControl=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control instance + */ + Control.create = function create(properties) { + return new Control(properties); + }; + + /** + * Encodes the specified Control message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.family != null && Object.hasOwnProperty.call(message, "family")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.family); + if (message.controlFamily != null && Object.hasOwnProperty.call(message, "controlFamily")) + $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.encode(message.controlFamily, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.responsibilityType != null && Object.hasOwnProperty.call(message, "responsibilityType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.responsibilityType); + if (message.googleResponsibilityDescription != null && Object.hasOwnProperty.call(message, "googleResponsibilityDescription")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.googleResponsibilityDescription); + if (message.googleResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "googleResponsibilityImplementation")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.googleResponsibilityImplementation); + if (message.customerResponsibilityDescription != null && Object.hasOwnProperty.call(message, "customerResponsibilityDescription")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.customerResponsibilityDescription); + if (message.customerResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "customerResponsibilityImplementation")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.customerResponsibilityImplementation); + if (message.sharedResponsibilityDescription != null && Object.hasOwnProperty.call(message, "sharedResponsibilityDescription")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.sharedResponsibilityDescription); + if (message.additionalContentUri != null && Object.hasOwnProperty.call(message, "additionalContentUri")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.additionalContentUri); + if (message.relatedFrameworks != null && message.relatedFrameworks.length) + for (var i = 0; i < message.relatedFrameworks.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.relatedFrameworks[i]); + return writer; + }; + + /** + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Control message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Control(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.family = reader.int32(); + break; + } + case 6: { + message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.decode(reader, reader.uint32()); + break; + } + case 7: { + message.responsibilityType = reader.int32(); + break; + } + case 8: { + message.googleResponsibilityDescription = reader.string(); + break; + } + case 9: { + message.googleResponsibilityImplementation = reader.string(); + break; + } + case 10: { + message.customerResponsibilityDescription = reader.string(); + break; + } + case 11: { + message.customerResponsibilityImplementation = reader.string(); + break; + } + case 12: { + message.sharedResponsibilityDescription = reader.string(); + break; + } + case 13: { + message.additionalContentUri = reader.string(); + break; + } + case 14: { + if (!(message.relatedFrameworks && message.relatedFrameworks.length)) + message.relatedFrameworks = []; + message.relatedFrameworks.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Control message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Control message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Control.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.family != null && message.hasOwnProperty("family")) + switch (message.family) { + default: + return "family: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify(message.controlFamily); + if (error) + return "controlFamily." + error; + } + if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) + switch (message.responsibilityType) { + default: + return "responsibilityType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) + if (!$util.isString(message.googleResponsibilityDescription)) + return "googleResponsibilityDescription: string expected"; + if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) + if (!$util.isString(message.googleResponsibilityImplementation)) + return "googleResponsibilityImplementation: string expected"; + if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) + if (!$util.isString(message.customerResponsibilityDescription)) + return "customerResponsibilityDescription: string expected"; + if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) + if (!$util.isString(message.customerResponsibilityImplementation)) + return "customerResponsibilityImplementation: string expected"; + if (message.sharedResponsibilityDescription != null && message.hasOwnProperty("sharedResponsibilityDescription")) + if (!$util.isString(message.sharedResponsibilityDescription)) + return "sharedResponsibilityDescription: string expected"; + if (message.additionalContentUri != null && message.hasOwnProperty("additionalContentUri")) + if (!$util.isString(message.additionalContentUri)) + return "additionalContentUri: string expected"; + if (message.relatedFrameworks != null && message.hasOwnProperty("relatedFrameworks")) { + if (!Array.isArray(message.relatedFrameworks)) + return "relatedFrameworks: array expected"; + for (var i = 0; i < message.relatedFrameworks.length; ++i) + if (!$util.isString(message.relatedFrameworks[i])) + return "relatedFrameworks: string[] expected"; + } + return null; + }; + + /** + * Creates a Control message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control + */ + Control.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Control) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Control(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.family) { + default: + if (typeof object.family === "number") { + message.family = object.family; + break; + } + break; + case "FAMILY_UNSPECIFIED": + case 0: + message.family = 0; + break; + case "AC": + case 1: + message.family = 1; + break; + case "AT": + case 2: + message.family = 2; + break; + case "AU": + case 3: + message.family = 3; + break; + case "CA": + case 4: + message.family = 4; + break; + case "CM": + case 5: + message.family = 5; + break; + case "CP": + case 6: + message.family = 6; + break; + case "IA": + case 7: + message.family = 7; + break; + case "IR": + case 8: + message.family = 8; + break; + case "MA": + case 9: + message.family = 9; + break; + case "MP": + case 10: + message.family = 10; + break; + case "PE": + case 11: + message.family = 11; + break; + case "PL": + case 12: + message.family = 12; + break; + case "PS": + case 13: + message.family = 13; + break; + case "RA": + case 14: + message.family = 14; + break; + case "SA": + case 15: + message.family = 15; + break; + case "SC": + case 16: + message.family = 16; + break; + case "SI": + case 17: + message.family = 17; + break; + case "SR": + case 18: + message.family = 18; + break; + } + if (object.controlFamily != null) { + if (typeof object.controlFamily !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Control.controlFamily: object expected"); + message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.fromObject(object.controlFamily); + } + switch (object.responsibilityType) { + default: + if (typeof object.responsibilityType === "number") { + message.responsibilityType = object.responsibilityType; + break; + } + break; + case "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED": + case 0: + message.responsibilityType = 0; + break; + case "GOOGLE": + case 1: + message.responsibilityType = 1; + break; + case "CUSTOMER": + case 2: + message.responsibilityType = 2; + break; + case "SHARED": + case 3: + message.responsibilityType = 3; + break; + } + if (object.googleResponsibilityDescription != null) + message.googleResponsibilityDescription = String(object.googleResponsibilityDescription); + if (object.googleResponsibilityImplementation != null) + message.googleResponsibilityImplementation = String(object.googleResponsibilityImplementation); + if (object.customerResponsibilityDescription != null) + message.customerResponsibilityDescription = String(object.customerResponsibilityDescription); + if (object.customerResponsibilityImplementation != null) + message.customerResponsibilityImplementation = String(object.customerResponsibilityImplementation); + if (object.sharedResponsibilityDescription != null) + message.sharedResponsibilityDescription = String(object.sharedResponsibilityDescription); + if (object.additionalContentUri != null) + message.additionalContentUri = String(object.additionalContentUri); + if (object.relatedFrameworks) { + if (!Array.isArray(object.relatedFrameworks)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Control.relatedFrameworks: array expected"); + message.relatedFrameworks = []; + for (var i = 0; i < object.relatedFrameworks.length; ++i) + message.relatedFrameworks[i] = String(object.relatedFrameworks[i]); + } + return message; + }; + + /** + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Control} message Control + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Control.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedFrameworks = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.family = options.enums === String ? "FAMILY_UNSPECIFIED" : 0; + object.controlFamily = null; + object.responsibilityType = options.enums === String ? "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" : 0; + object.googleResponsibilityDescription = ""; + object.googleResponsibilityImplementation = ""; + object.customerResponsibilityDescription = ""; + object.customerResponsibilityImplementation = ""; + object.sharedResponsibilityDescription = ""; + object.additionalContentUri = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.family != null && message.hasOwnProperty("family")) + object.family = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Control.Family[message.family] === undefined ? message.family : $root.google.cloud.cloudsecuritycompliance.v1.Control.Family[message.family] : message.family; + if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) + object.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.toObject(message.controlFamily, options); + if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) + object.responsibilityType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.responsibilityType] === undefined ? message.responsibilityType : $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.responsibilityType] : message.responsibilityType; + if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) + object.googleResponsibilityDescription = message.googleResponsibilityDescription; + if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) + object.googleResponsibilityImplementation = message.googleResponsibilityImplementation; + if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) + object.customerResponsibilityDescription = message.customerResponsibilityDescription; + if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) + object.customerResponsibilityImplementation = message.customerResponsibilityImplementation; + if (message.sharedResponsibilityDescription != null && message.hasOwnProperty("sharedResponsibilityDescription")) + object.sharedResponsibilityDescription = message.sharedResponsibilityDescription; + if (message.additionalContentUri != null && message.hasOwnProperty("additionalContentUri")) + object.additionalContentUri = message.additionalContentUri; + if (message.relatedFrameworks && message.relatedFrameworks.length) { + object.relatedFrameworks = []; + for (var j = 0; j < message.relatedFrameworks.length; ++j) + object.relatedFrameworks[j] = message.relatedFrameworks[j]; + } + return object; + }; + + /** + * Converts this Control to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + * @returns {Object.} JSON object + */ + Control.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Control + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Control.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Control"; + }; + + /** + * Family enum. + * @name google.cloud.cloudsecuritycompliance.v1.Control.Family + * @enum {number} + * @property {number} FAMILY_UNSPECIFIED=0 FAMILY_UNSPECIFIED value + * @property {number} AC=1 AC value + * @property {number} AT=2 AT value + * @property {number} AU=3 AU value + * @property {number} CA=4 CA value + * @property {number} CM=5 CM value + * @property {number} CP=6 CP value + * @property {number} IA=7 IA value + * @property {number} IR=8 IR value + * @property {number} MA=9 MA value + * @property {number} MP=10 MP value + * @property {number} PE=11 PE value + * @property {number} PL=12 PL value + * @property {number} PS=13 PS value + * @property {number} RA=14 RA value + * @property {number} SA=15 SA value + * @property {number} SC=16 SC value + * @property {number} SI=17 SI value + * @property {number} SR=18 SR value + */ + Control.Family = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAMILY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AC"] = 1; + values[valuesById[2] = "AT"] = 2; + values[valuesById[3] = "AU"] = 3; + values[valuesById[4] = "CA"] = 4; + values[valuesById[5] = "CM"] = 5; + values[valuesById[6] = "CP"] = 6; + values[valuesById[7] = "IA"] = 7; + values[valuesById[8] = "IR"] = 8; + values[valuesById[9] = "MA"] = 9; + values[valuesById[10] = "MP"] = 10; + values[valuesById[11] = "PE"] = 11; + values[valuesById[12] = "PL"] = 12; + values[valuesById[13] = "PS"] = 13; + values[valuesById[14] = "RA"] = 14; + values[valuesById[15] = "SA"] = 15; + values[valuesById[16] = "SC"] = 16; + values[valuesById[17] = "SI"] = 17; + values[valuesById[18] = "SR"] = 18; + return values; + })(); + + return Control; + })(); + + v1.ControlFamily = (function() { + + /** + * Properties of a ControlFamily. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IControlFamily + * @property {string|null} [familyId] ControlFamily familyId + * @property {string|null} [displayName] ControlFamily displayName + */ + + /** + * Constructs a new ControlFamily. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ControlFamily. + * @implements IControlFamily + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily=} [properties] Properties to set + */ + function ControlFamily(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ControlFamily familyId. + * @member {string} familyId + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @instance + */ + ControlFamily.prototype.familyId = ""; + + /** + * ControlFamily displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @instance + */ + ControlFamily.prototype.displayName = ""; + + /** + * Creates a new ControlFamily instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily instance + */ + ControlFamily.create = function create(properties) { + return new ControlFamily(properties); + }; + + /** + * Encodes the specified ControlFamily message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily} message ControlFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlFamily.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.familyId != null && Object.hasOwnProperty.call(message, "familyId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ControlFamily message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily} message ControlFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlFamily.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ControlFamily message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlFamily.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.familyId = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ControlFamily message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlFamily.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ControlFamily message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ControlFamily.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyId != null && message.hasOwnProperty("familyId")) + if (!$util.isString(message.familyId)) + return "familyId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a ControlFamily message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily + */ + ControlFamily.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily(); + if (object.familyId != null) + message.familyId = String(object.familyId); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a ControlFamily message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ControlFamily} message ControlFamily + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ControlFamily.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.familyId = ""; + object.displayName = ""; + } + if (message.familyId != null && message.hasOwnProperty("familyId")) + object.familyId = message.familyId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ControlFamily to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @instance + * @returns {Object.} JSON object + */ + ControlFamily.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ControlFamily + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ControlFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ControlFamily"; + }; + + return ControlFamily; + })(); + + v1.CmEnrollmentService = (function() { + + /** + * Constructs a new CmEnrollmentService service. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CmEnrollmentService + * @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 CmEnrollmentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CmEnrollmentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CmEnrollmentService; + + /** + * Creates new CmEnrollmentService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService + * @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 {CmEnrollmentService} RPC service. Useful where requests and/or responses are streamed. + */ + CmEnrollmentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|updateCmEnrollment}. + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService + * @typedef UpdateCmEnrollmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} [response] CmEnrollment + */ + + /** + * Calls UpdateCmEnrollment. + * @function updateCmEnrollment + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} request UpdateCmEnrollmentRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollmentCallback} callback Node-style callback called with the error, if any, and CmEnrollment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CmEnrollmentService.prototype.updateCmEnrollment = function updateCmEnrollment(request, callback) { + return this.rpcCall(updateCmEnrollment, $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest, $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment, request, callback); + }, "name", { value: "UpdateCmEnrollment" }); + + /** + * Calls UpdateCmEnrollment. + * @function updateCmEnrollment + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} request UpdateCmEnrollmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|calculateEffectiveCmEnrollment}. + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService + * @typedef CalculateEffectiveCmEnrollmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} [response] CalculateEffectiveCmEnrollmentResponse + */ + + /** + * Calls CalculateEffectiveCmEnrollment. + * @function calculateEffectiveCmEnrollment + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} request CalculateEffectiveCmEnrollmentRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollmentCallback} callback Node-style callback called with the error, if any, and CalculateEffectiveCmEnrollmentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CmEnrollmentService.prototype.calculateEffectiveCmEnrollment = function calculateEffectiveCmEnrollment(request, callback) { + return this.rpcCall(calculateEffectiveCmEnrollment, $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest, $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse, request, callback); + }, "name", { value: "CalculateEffectiveCmEnrollment" }); + + /** + * Calls CalculateEffectiveCmEnrollment. + * @function calculateEffectiveCmEnrollment + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} request CalculateEffectiveCmEnrollmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CmEnrollmentService; + })(); + + v1.UpdateCmEnrollmentRequest = (function() { + + /** + * Properties of an UpdateCmEnrollmentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IUpdateCmEnrollmentRequest + * @property {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null} [cmEnrollment] UpdateCmEnrollmentRequest cmEnrollment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmEnrollmentRequest updateMask + */ + + /** + * Constructs a new UpdateCmEnrollmentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an UpdateCmEnrollmentRequest. + * @implements IUpdateCmEnrollmentRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest=} [properties] Properties to set + */ + function UpdateCmEnrollmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCmEnrollmentRequest cmEnrollment. + * @member {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null|undefined} cmEnrollment + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @instance + */ + UpdateCmEnrollmentRequest.prototype.cmEnrollment = null; + + /** + * UpdateCmEnrollmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @instance + */ + UpdateCmEnrollmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCmEnrollmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest instance + */ + UpdateCmEnrollmentRequest.create = function create(properties) { + return new UpdateCmEnrollmentRequest(properties); + }; + + /** + * Encodes the specified UpdateCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} message UpdateCmEnrollmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmEnrollmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cmEnrollment != null && Object.hasOwnProperty.call(message, "cmEnrollment")) + $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.encode(message.cmEnrollment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} message UpdateCmEnrollmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCmEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmEnrollmentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCmEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCmEnrollmentRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCmEnrollmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify(message.cmEnrollment); + if (error) + return "cmEnrollment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest + */ + UpdateCmEnrollmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest(); + if (object.cmEnrollment != null) { + if (typeof object.cmEnrollment !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.cmEnrollment: object expected"); + message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.fromObject(object.cmEnrollment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCmEnrollmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} message UpdateCmEnrollmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCmEnrollmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cmEnrollment = null; + object.updateMask = null; + } + if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) + object.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.toObject(message.cmEnrollment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateCmEnrollmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCmEnrollmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCmEnrollmentRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCmEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest"; + }; + + return UpdateCmEnrollmentRequest; + })(); + + v1.CalculateEffectiveCmEnrollmentRequest = (function() { + + /** + * Properties of a CalculateEffectiveCmEnrollmentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICalculateEffectiveCmEnrollmentRequest + * @property {string|null} [name] CalculateEffectiveCmEnrollmentRequest name + */ + + /** + * Constructs a new CalculateEffectiveCmEnrollmentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CalculateEffectiveCmEnrollmentRequest. + * @implements ICalculateEffectiveCmEnrollmentRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest=} [properties] Properties to set + */ + function CalculateEffectiveCmEnrollmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateEffectiveCmEnrollmentRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @instance + */ + CalculateEffectiveCmEnrollmentRequest.prototype.name = ""; + + /** + * Creates a new CalculateEffectiveCmEnrollmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest instance + */ + CalculateEffectiveCmEnrollmentRequest.create = function create(properties) { + return new CalculateEffectiveCmEnrollmentRequest(properties); + }; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} message CalculateEffectiveCmEnrollmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateEffectiveCmEnrollmentRequest.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 CalculateEffectiveCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} message CalculateEffectiveCmEnrollmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateEffectiveCmEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateEffectiveCmEnrollmentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateEffectiveCmEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateEffectiveCmEnrollmentRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateEffectiveCmEnrollmentRequest.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 CalculateEffectiveCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest + */ + CalculateEffectiveCmEnrollmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CalculateEffectiveCmEnrollmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} message CalculateEffectiveCmEnrollmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateEffectiveCmEnrollmentRequest.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 CalculateEffectiveCmEnrollmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @instance + * @returns {Object.} JSON object + */ + CalculateEffectiveCmEnrollmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateEffectiveCmEnrollmentRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateEffectiveCmEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest"; + }; + + return CalculateEffectiveCmEnrollmentRequest; + })(); + + v1.CmEnrollment = (function() { + + /** + * Properties of a CmEnrollment. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICmEnrollment + * @property {string|null} [name] CmEnrollment name + * @property {boolean|null} [enrolled] CmEnrollment enrolled + * @property {google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null} [auditConfig] CmEnrollment auditConfig + */ + + /** + * Constructs a new CmEnrollment. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CmEnrollment. + * @implements ICmEnrollment + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment=} [properties] Properties to set + */ + function CmEnrollment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CmEnrollment name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @instance + */ + CmEnrollment.prototype.name = ""; + + /** + * CmEnrollment enrolled. + * @member {boolean} enrolled + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @instance + */ + CmEnrollment.prototype.enrolled = false; + + /** + * CmEnrollment auditConfig. + * @member {google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null|undefined} auditConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @instance + */ + CmEnrollment.prototype.auditConfig = null; + + /** + * Creates a new CmEnrollment instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment instance + */ + CmEnrollment.create = function create(properties) { + return new CmEnrollment(properties); + }; + + /** + * Encodes the specified CmEnrollment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment} message CmEnrollment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmEnrollment.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.enrolled != null && Object.hasOwnProperty.call(message, "enrolled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enrolled); + if (message.auditConfig != null && Object.hasOwnProperty.call(message, "auditConfig")) + $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.encode(message.auditConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CmEnrollment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment} message CmEnrollment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmEnrollment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CmEnrollment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmEnrollment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.enrolled = reader.bool(); + break; + } + case 3: { + message.auditConfig = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CmEnrollment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmEnrollment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CmEnrollment message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CmEnrollment.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.enrolled != null && message.hasOwnProperty("enrolled")) + if (typeof message.enrolled !== "boolean") + return "enrolled: boolean expected"; + if (message.auditConfig != null && message.hasOwnProperty("auditConfig")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify(message.auditConfig); + if (error) + return "auditConfig." + error; + } + return null; + }; + + /** + * Creates a CmEnrollment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment + */ + CmEnrollment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment(); + if (object.name != null) + message.name = String(object.name); + if (object.enrolled != null) + message.enrolled = Boolean(object.enrolled); + if (object.auditConfig != null) { + if (typeof object.auditConfig !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CmEnrollment.auditConfig: object expected"); + message.auditConfig = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.fromObject(object.auditConfig); + } + return message; + }; + + /** + * Creates a plain object from a CmEnrollment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} message CmEnrollment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CmEnrollment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.enrolled = false; + object.auditConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.enrolled != null && message.hasOwnProperty("enrolled")) + object.enrolled = message.enrolled; + if (message.auditConfig != null && message.hasOwnProperty("auditConfig")) + object.auditConfig = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.toObject(message.auditConfig, options); + return object; + }; + + /** + * Converts this CmEnrollment to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @instance + * @returns {Object.} JSON object + */ + CmEnrollment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CmEnrollment + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CmEnrollment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CmEnrollment"; + }; + + return CmEnrollment; + })(); + + v1.CalculateEffectiveCmEnrollmentResponse = (function() { + + /** + * Properties of a CalculateEffectiveCmEnrollmentResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICalculateEffectiveCmEnrollmentResponse + * @property {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null} [cmEnrollment] CalculateEffectiveCmEnrollmentResponse cmEnrollment + */ + + /** + * Constructs a new CalculateEffectiveCmEnrollmentResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CalculateEffectiveCmEnrollmentResponse. + * @implements ICalculateEffectiveCmEnrollmentResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse=} [properties] Properties to set + */ + function CalculateEffectiveCmEnrollmentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateEffectiveCmEnrollmentResponse cmEnrollment. + * @member {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null|undefined} cmEnrollment + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @instance + */ + CalculateEffectiveCmEnrollmentResponse.prototype.cmEnrollment = null; + + /** + * Creates a new CalculateEffectiveCmEnrollmentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse instance + */ + CalculateEffectiveCmEnrollmentResponse.create = function create(properties) { + return new CalculateEffectiveCmEnrollmentResponse(properties); + }; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse} message CalculateEffectiveCmEnrollmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateEffectiveCmEnrollmentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cmEnrollment != null && Object.hasOwnProperty.call(message, "cmEnrollment")) + $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.encode(message.cmEnrollment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CalculateEffectiveCmEnrollmentResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse} message CalculateEffectiveCmEnrollmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateEffectiveCmEnrollmentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateEffectiveCmEnrollmentResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateEffectiveCmEnrollmentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateEffectiveCmEnrollmentResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateEffectiveCmEnrollmentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify(message.cmEnrollment); + if (error) + return "cmEnrollment." + error; + } + return null; + }; + + /** + * Creates a CalculateEffectiveCmEnrollmentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse + */ + CalculateEffectiveCmEnrollmentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse(); + if (object.cmEnrollment != null) { + if (typeof object.cmEnrollment !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.cmEnrollment: object expected"); + message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.fromObject(object.cmEnrollment); + } + return message; + }; + + /** + * Creates a plain object from a CalculateEffectiveCmEnrollmentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} message CalculateEffectiveCmEnrollmentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateEffectiveCmEnrollmentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cmEnrollment = null; + if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) + object.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.toObject(message.cmEnrollment, options); + return object; + }; + + /** + * Converts this CalculateEffectiveCmEnrollmentResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @instance + * @returns {Object.} JSON object + */ + CalculateEffectiveCmEnrollmentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateEffectiveCmEnrollmentResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateEffectiveCmEnrollmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse"; + }; + + return CalculateEffectiveCmEnrollmentResponse; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IAuditConfig + * @property {Array.|null} [destinations] AuditConfig destinations + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig destinations. + * @member {Array.} destinations + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.destinations = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinations != null && message.destinations.length) + for (var i = 0; i < message.destinations.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.encode(message.destinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + message.destinations.push($root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify(message.destinations[i]); + if (error) + return "destinations." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig(); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AuditConfig.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) { + if (typeof object.destinations[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AuditConfig.destinations: object expected"); + message.destinations[i] = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.fromObject(object.destinations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.toObject(message.destinations[j], options); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AuditConfig"; + }; + + AuditConfig.CmEligibleDestination = (function() { + + /** + * Properties of a CmEligibleDestination. + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @interface ICmEligibleDestination + * @property {string|null} [gcsBucket] CmEligibleDestination gcsBucket + */ + + /** + * Constructs a new CmEligibleDestination. + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig + * @classdesc Represents a CmEligibleDestination. + * @implements ICmEligibleDestination + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination=} [properties] Properties to set + */ + function CmEligibleDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CmEligibleDestination gcsBucket. + * @member {string|null|undefined} gcsBucket + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @instance + */ + CmEligibleDestination.prototype.gcsBucket = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CmEligibleDestination cmEligibleDestinations. + * @member {"gcsBucket"|undefined} cmEligibleDestinations + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @instance + */ + Object.defineProperty(CmEligibleDestination.prototype, "cmEligibleDestinations", { + get: $util.oneOfGetter($oneOfFields = ["gcsBucket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CmEligibleDestination instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination instance + */ + CmEligibleDestination.create = function create(properties) { + return new CmEligibleDestination(properties); + }; + + /** + * Encodes the specified CmEligibleDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination} message CmEligibleDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmEligibleDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsBucket != null && Object.hasOwnProperty.call(message, "gcsBucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsBucket); + return writer; + }; + + /** + * Encodes the specified CmEligibleDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination} message CmEligibleDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CmEligibleDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CmEligibleDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmEligibleDestination.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.gcsBucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CmEligibleDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CmEligibleDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CmEligibleDestination message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CmEligibleDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) { + properties.cmEligibleDestinations = 1; + if (!$util.isString(message.gcsBucket)) + return "gcsBucket: string expected"; + } + return null; + }; + + /** + * Creates a CmEligibleDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination + */ + CmEligibleDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination(); + if (object.gcsBucket != null) + message.gcsBucket = String(object.gcsBucket); + return message; + }; + + /** + * Creates a plain object from a CmEligibleDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} message CmEligibleDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CmEligibleDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) { + object.gcsBucket = message.gcsBucket; + if (options.oneofs) + object.cmEligibleDestinations = "gcsBucket"; + } + return object; + }; + + /** + * Converts this CmEligibleDestination to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @instance + * @returns {Object.} JSON object + */ + CmEligibleDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CmEligibleDestination + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CmEligibleDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination"; + }; + + return CmEligibleDestination; + })(); + + return AuditConfig; + })(); + + v1.Config = (function() { + + /** + * Constructs a new Config service. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Config + * @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 Config(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Config.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Config; + + /** + * Creates new Config service using the specified rpc implementation. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @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 {Config} RPC service. Useful where requests and/or responses are streamed. + */ + Config.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listFrameworks}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef ListFrameworksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} [response] ListFrameworksResponse + */ + + /** + * Calls ListFrameworks. + * @function listFrameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} request ListFrameworksRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworksCallback} callback Node-style callback called with the error, if any, and ListFrameworksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listFrameworks = function listFrameworks(request, callback) { + return this.rpcCall(listFrameworks, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse, request, callback); + }, "name", { value: "ListFrameworks" }); + + /** + * Calls ListFrameworks. + * @function listFrameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} request ListFrameworksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getFramework}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef GetFrameworkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.Framework} [response] Framework + */ + + /** + * Calls GetFramework. + * @function getFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} request GetFrameworkRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.GetFrameworkCallback} callback Node-style callback called with the error, if any, and Framework + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getFramework = function getFramework(request, callback) { + return this.rpcCall(getFramework, $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest, $root.google.cloud.cloudsecuritycompliance.v1.Framework, request, callback); + }, "name", { value: "GetFramework" }); + + /** + * Calls GetFramework. + * @function getFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} request GetFrameworkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createFramework}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef CreateFrameworkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.Framework} [response] Framework + */ + + /** + * Calls CreateFramework. + * @function createFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} request CreateFrameworkRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.CreateFrameworkCallback} callback Node-style callback called with the error, if any, and Framework + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.createFramework = function createFramework(request, callback) { + return this.rpcCall(createFramework, $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest, $root.google.cloud.cloudsecuritycompliance.v1.Framework, request, callback); + }, "name", { value: "CreateFramework" }); + + /** + * Calls CreateFramework. + * @function createFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} request CreateFrameworkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateFramework}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef UpdateFrameworkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.Framework} [response] Framework + */ + + /** + * Calls UpdateFramework. + * @function updateFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} request UpdateFrameworkRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.UpdateFrameworkCallback} callback Node-style callback called with the error, if any, and Framework + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.updateFramework = function updateFramework(request, callback) { + return this.rpcCall(updateFramework, $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest, $root.google.cloud.cloudsecuritycompliance.v1.Framework, request, callback); + }, "name", { value: "UpdateFramework" }); + + /** + * Calls UpdateFramework. + * @function updateFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} request UpdateFrameworkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteFramework}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef DeleteFrameworkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFramework. + * @function deleteFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} request DeleteFrameworkRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.DeleteFrameworkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.deleteFramework = function deleteFramework(request, callback) { + return this.rpcCall(deleteFramework, $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFramework" }); + + /** + * Calls DeleteFramework. + * @function deleteFramework + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} request DeleteFrameworkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listCloudControls}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef ListCloudControlsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} [response] ListCloudControlsResponse + */ + + /** + * Calls ListCloudControls. + * @function listCloudControls + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} request ListCloudControlsRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControlsCallback} callback Node-style callback called with the error, if any, and ListCloudControlsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listCloudControls = function listCloudControls(request, callback) { + return this.rpcCall(listCloudControls, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse, request, callback); + }, "name", { value: "ListCloudControls" }); + + /** + * Calls ListCloudControls. + * @function listCloudControls + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} request ListCloudControlsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getCloudControl}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef GetCloudControlCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} [response] CloudControl + */ + + /** + * Calls GetCloudControl. + * @function getCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} request GetCloudControlRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControlCallback} callback Node-style callback called with the error, if any, and CloudControl + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getCloudControl = function getCloudControl(request, callback) { + return this.rpcCall(getCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControl, request, callback); + }, "name", { value: "GetCloudControl" }); + + /** + * Calls GetCloudControl. + * @function getCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} request GetCloudControlRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createCloudControl}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef CreateCloudControlCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} [response] CloudControl + */ + + /** + * Calls CreateCloudControl. + * @function createCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} request CreateCloudControlRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControlCallback} callback Node-style callback called with the error, if any, and CloudControl + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.createCloudControl = function createCloudControl(request, callback) { + return this.rpcCall(createCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControl, request, callback); + }, "name", { value: "CreateCloudControl" }); + + /** + * Calls CreateCloudControl. + * @function createCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} request CreateCloudControlRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateCloudControl}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef UpdateCloudControlCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} [response] CloudControl + */ + + /** + * Calls UpdateCloudControl. + * @function updateCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} request UpdateCloudControlRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControlCallback} callback Node-style callback called with the error, if any, and CloudControl + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.updateCloudControl = function updateCloudControl(request, callback) { + return this.rpcCall(updateCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControl, request, callback); + }, "name", { value: "UpdateCloudControl" }); + + /** + * Calls UpdateCloudControl. + * @function updateCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} request UpdateCloudControlRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteCloudControl}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @typedef DeleteCloudControlCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteCloudControl. + * @function deleteCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} request DeleteCloudControlRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControlCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.deleteCloudControl = function deleteCloudControl(request, callback) { + return this.rpcCall(deleteCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteCloudControl" }); + + /** + * Calls DeleteCloudControl. + * @function deleteCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.Config + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} request DeleteCloudControlRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Config; + })(); + + v1.ListFrameworksRequest = (function() { + + /** + * Properties of a ListFrameworksRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworksRequest + * @property {string|null} [parent] ListFrameworksRequest parent + * @property {number|null} [pageSize] ListFrameworksRequest pageSize + * @property {string|null} [pageToken] ListFrameworksRequest pageToken + */ + + /** + * Constructs a new ListFrameworksRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworksRequest. + * @implements IListFrameworksRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest=} [properties] Properties to set + */ + function ListFrameworksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworksRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @instance + */ + ListFrameworksRequest.prototype.parent = ""; + + /** + * ListFrameworksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @instance + */ + ListFrameworksRequest.prototype.pageSize = 0; + + /** + * ListFrameworksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @instance + */ + ListFrameworksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListFrameworksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest instance + */ + ListFrameworksRequest.create = function create(properties) { + return new ListFrameworksRequest(properties); + }; + + /** + * Encodes the specified ListFrameworksRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} message ListFrameworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListFrameworksRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} message ListFrameworksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworksRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFrameworksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworksRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListFrameworksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest + */ + ListFrameworksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListFrameworksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} message ListFrameworksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListFrameworksRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @instance + * @returns {Object.} JSON object + */ + ListFrameworksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworksRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest"; + }; + + return ListFrameworksRequest; + })(); + + v1.ListFrameworksResponse = (function() { + + /** + * Properties of a ListFrameworksResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworksResponse + * @property {Array.|null} [frameworks] ListFrameworksResponse frameworks + * @property {string|null} [nextPageToken] ListFrameworksResponse nextPageToken + */ + + /** + * Constructs a new ListFrameworksResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworksResponse. + * @implements IListFrameworksResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse=} [properties] Properties to set + */ + function ListFrameworksResponse(properties) { + this.frameworks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworksResponse frameworks. + * @member {Array.} frameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @instance + */ + ListFrameworksResponse.prototype.frameworks = $util.emptyArray; + + /** + * ListFrameworksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @instance + */ + ListFrameworksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFrameworksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse instance + */ + ListFrameworksResponse.create = function create(properties) { + return new ListFrameworksResponse(properties); + }; + + /** + * Encodes the specified ListFrameworksResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse} message ListFrameworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frameworks != null && message.frameworks.length) + for (var i = 0; i < message.frameworks.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.Framework.encode(message.frameworks[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 ListFrameworksResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse} message ListFrameworksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworksResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.frameworks && message.frameworks.length)) + message.frameworks = []; + message.frameworks.push($root.google.cloud.cloudsecuritycompliance.v1.Framework.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFrameworksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworksResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frameworks != null && message.hasOwnProperty("frameworks")) { + if (!Array.isArray(message.frameworks)) + return "frameworks: array expected"; + for (var i = 0; i < message.frameworks.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Framework.verify(message.frameworks[i]); + if (error) + return "frameworks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFrameworksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse + */ + ListFrameworksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse(); + if (object.frameworks) { + if (!Array.isArray(object.frameworks)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.frameworks: array expected"); + message.frameworks = []; + for (var i = 0; i < object.frameworks.length; ++i) { + if (typeof object.frameworks[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.frameworks: object expected"); + message.frameworks[i] = $root.google.cloud.cloudsecuritycompliance.v1.Framework.fromObject(object.frameworks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFrameworksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} message ListFrameworksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.frameworks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.frameworks && message.frameworks.length) { + object.frameworks = []; + for (var j = 0; j < message.frameworks.length; ++j) + object.frameworks[j] = $root.google.cloud.cloudsecuritycompliance.v1.Framework.toObject(message.frameworks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFrameworksResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @instance + * @returns {Object.} JSON object + */ + ListFrameworksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworksResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse"; + }; + + return ListFrameworksResponse; + })(); + + v1.GetFrameworkRequest = (function() { + + /** + * Properties of a GetFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IGetFrameworkRequest + * @property {string|null} [name] GetFrameworkRequest name + * @property {number|Long|null} [majorRevisionId] GetFrameworkRequest majorRevisionId + */ + + /** + * Constructs a new GetFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a GetFrameworkRequest. + * @implements IGetFrameworkRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest=} [properties] Properties to set + */ + function GetFrameworkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFrameworkRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @instance + */ + GetFrameworkRequest.prototype.name = ""; + + /** + * GetFrameworkRequest majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @instance + */ + GetFrameworkRequest.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GetFrameworkRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest instance + */ + GetFrameworkRequest.create = function create(properties) { + return new GetFrameworkRequest(properties); + }; + + /** + * Encodes the specified GetFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} message GetFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFrameworkRequest.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); + return writer; + }; + + /** + * Encodes the specified GetFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} message GetFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFrameworkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFrameworkRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.majorRevisionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFrameworkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFrameworkRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFrameworkRequest.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + return null; + }; + + /** + * Creates a GetFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest + */ + GetFrameworkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GetFrameworkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} message GetFrameworkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFrameworkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + return object; + }; + + /** + * Converts this GetFrameworkRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @instance + * @returns {Object.} JSON object + */ + GetFrameworkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFrameworkRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest"; + }; + + return GetFrameworkRequest; + })(); + + v1.CreateFrameworkRequest = (function() { + + /** + * Properties of a CreateFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICreateFrameworkRequest + * @property {string|null} [parent] CreateFrameworkRequest parent + * @property {string|null} [frameworkId] CreateFrameworkRequest frameworkId + * @property {google.cloud.cloudsecuritycompliance.v1.IFramework|null} [framework] CreateFrameworkRequest framework + */ + + /** + * Constructs a new CreateFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CreateFrameworkRequest. + * @implements ICreateFrameworkRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest=} [properties] Properties to set + */ + function CreateFrameworkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFrameworkRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @instance + */ + CreateFrameworkRequest.prototype.parent = ""; + + /** + * CreateFrameworkRequest frameworkId. + * @member {string} frameworkId + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @instance + */ + CreateFrameworkRequest.prototype.frameworkId = ""; + + /** + * CreateFrameworkRequest framework. + * @member {google.cloud.cloudsecuritycompliance.v1.IFramework|null|undefined} framework + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @instance + */ + CreateFrameworkRequest.prototype.framework = null; + + /** + * Creates a new CreateFrameworkRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest instance + */ + CreateFrameworkRequest.create = function create(properties) { + return new CreateFrameworkRequest(properties); + }; + + /** + * Encodes the specified CreateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} message CreateFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFrameworkRequest.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.frameworkId != null && Object.hasOwnProperty.call(message, "frameworkId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkId); + if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) + $root.google.cloud.cloudsecuritycompliance.v1.Framework.encode(message.framework, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} message CreateFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFrameworkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFrameworkRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.frameworkId = reader.string(); + break; + } + case 3: { + message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFrameworkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFrameworkRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFrameworkRequest.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.frameworkId != null && message.hasOwnProperty("frameworkId")) + if (!$util.isString(message.frameworkId)) + return "frameworkId: string expected"; + if (message.framework != null && message.hasOwnProperty("framework")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Framework.verify(message.framework); + if (error) + return "framework." + error; + } + return null; + }; + + /** + * Creates a CreateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest + */ + CreateFrameworkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.frameworkId != null) + message.frameworkId = String(object.frameworkId); + if (object.framework != null) { + if (typeof object.framework !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.framework: object expected"); + message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.fromObject(object.framework); + } + return message; + }; + + /** + * Creates a plain object from a CreateFrameworkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} message CreateFrameworkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFrameworkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.frameworkId = ""; + object.framework = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.frameworkId != null && message.hasOwnProperty("frameworkId")) + object.frameworkId = message.frameworkId; + if (message.framework != null && message.hasOwnProperty("framework")) + object.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.toObject(message.framework, options); + return object; + }; + + /** + * Converts this CreateFrameworkRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFrameworkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFrameworkRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest"; + }; + + return CreateFrameworkRequest; + })(); + + v1.UpdateFrameworkRequest = (function() { + + /** + * Properties of an UpdateFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IUpdateFrameworkRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFrameworkRequest updateMask + * @property {google.cloud.cloudsecuritycompliance.v1.IFramework|null} [framework] UpdateFrameworkRequest framework + * @property {number|Long|null} [majorRevisionId] UpdateFrameworkRequest majorRevisionId + */ + + /** + * Constructs a new UpdateFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an UpdateFrameworkRequest. + * @implements IUpdateFrameworkRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest=} [properties] Properties to set + */ + function UpdateFrameworkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFrameworkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @instance + */ + UpdateFrameworkRequest.prototype.updateMask = null; + + /** + * UpdateFrameworkRequest framework. + * @member {google.cloud.cloudsecuritycompliance.v1.IFramework|null|undefined} framework + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @instance + */ + UpdateFrameworkRequest.prototype.framework = null; + + /** + * UpdateFrameworkRequest majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @instance + */ + UpdateFrameworkRequest.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new UpdateFrameworkRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest instance + */ + UpdateFrameworkRequest.create = function create(properties) { + return new UpdateFrameworkRequest(properties); + }; + + /** + * Encodes the specified UpdateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} message UpdateFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFrameworkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) + $root.google.cloud.cloudsecuritycompliance.v1.Framework.encode(message.framework, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.majorRevisionId); + return writer; + }; + + /** + * Encodes the specified UpdateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} message UpdateFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFrameworkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFrameworkRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.decode(reader, reader.uint32()); + break; + } + case 3: { + message.majorRevisionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFrameworkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFrameworkRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFrameworkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.framework != null && message.hasOwnProperty("framework")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Framework.verify(message.framework); + if (error) + return "framework." + error; + } + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + return null; + }; + + /** + * Creates an UpdateFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest + */ + UpdateFrameworkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.framework != null) { + if (typeof object.framework !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.framework: object expected"); + message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.fromObject(object.framework); + } + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an UpdateFrameworkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} message UpdateFrameworkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFrameworkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.framework = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.framework != null && message.hasOwnProperty("framework")) + object.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.toObject(message.framework, options); + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + return object; + }; + + /** + * Converts this UpdateFrameworkRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateFrameworkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFrameworkRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest"; + }; + + return UpdateFrameworkRequest; + })(); + + v1.DeleteFrameworkRequest = (function() { + + /** + * Properties of a DeleteFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IDeleteFrameworkRequest + * @property {string|null} [name] DeleteFrameworkRequest name + */ + + /** + * Constructs a new DeleteFrameworkRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a DeleteFrameworkRequest. + * @implements IDeleteFrameworkRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest=} [properties] Properties to set + */ + function DeleteFrameworkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFrameworkRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @instance + */ + DeleteFrameworkRequest.prototype.name = ""; + + /** + * Creates a new DeleteFrameworkRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest instance + */ + DeleteFrameworkRequest.create = function create(properties) { + return new DeleteFrameworkRequest(properties); + }; + + /** + * Encodes the specified DeleteFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} message DeleteFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFrameworkRequest.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 DeleteFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} message DeleteFrameworkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFrameworkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFrameworkRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFrameworkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFrameworkRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFrameworkRequest.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 DeleteFrameworkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest + */ + DeleteFrameworkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteFrameworkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} message DeleteFrameworkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFrameworkRequest.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 DeleteFrameworkRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFrameworkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFrameworkRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest"; + }; + + return DeleteFrameworkRequest; + })(); + + v1.ListCloudControlsRequest = (function() { + + /** + * Properties of a ListCloudControlsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListCloudControlsRequest + * @property {string|null} [parent] ListCloudControlsRequest parent + * @property {number|null} [pageSize] ListCloudControlsRequest pageSize + * @property {string|null} [pageToken] ListCloudControlsRequest pageToken + */ + + /** + * Constructs a new ListCloudControlsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListCloudControlsRequest. + * @implements IListCloudControlsRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest=} [properties] Properties to set + */ + function ListCloudControlsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCloudControlsRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @instance + */ + ListCloudControlsRequest.prototype.parent = ""; + + /** + * ListCloudControlsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @instance + */ + ListCloudControlsRequest.prototype.pageSize = 0; + + /** + * ListCloudControlsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @instance + */ + ListCloudControlsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCloudControlsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest instance + */ + ListCloudControlsRequest.create = function create(properties) { + return new ListCloudControlsRequest(properties); + }; + + /** + * Encodes the specified ListCloudControlsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} message ListCloudControlsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCloudControlsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} message ListCloudControlsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCloudControlsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCloudControlsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCloudControlsRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCloudControlsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCloudControlsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest + */ + ListCloudControlsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCloudControlsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} message ListCloudControlsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCloudControlsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCloudControlsRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCloudControlsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCloudControlsRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCloudControlsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest"; + }; + + return ListCloudControlsRequest; + })(); + + v1.ListCloudControlsResponse = (function() { + + /** + * Properties of a ListCloudControlsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListCloudControlsResponse + * @property {Array.|null} [cloudControls] ListCloudControlsResponse cloudControls + * @property {string|null} [nextPageToken] ListCloudControlsResponse nextPageToken + */ + + /** + * Constructs a new ListCloudControlsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListCloudControlsResponse. + * @implements IListCloudControlsResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse=} [properties] Properties to set + */ + function ListCloudControlsResponse(properties) { + this.cloudControls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCloudControlsResponse cloudControls. + * @member {Array.} cloudControls + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @instance + */ + ListCloudControlsResponse.prototype.cloudControls = $util.emptyArray; + + /** + * ListCloudControlsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @instance + */ + ListCloudControlsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCloudControlsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse instance + */ + ListCloudControlsResponse.create = function create(properties) { + return new ListCloudControlsResponse(properties); + }; + + /** + * Encodes the specified ListCloudControlsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse} message ListCloudControlsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudControls != null && message.cloudControls.length) + for (var i = 0; i < message.cloudControls.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.cloudControls[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 ListCloudControlsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse} message ListCloudControlsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCloudControlsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cloudControls && message.cloudControls.length)) + message.cloudControls = []; + message.cloudControls.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCloudControlsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCloudControlsResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCloudControlsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudControls != null && message.hasOwnProperty("cloudControls")) { + if (!Array.isArray(message.cloudControls)) + return "cloudControls: array expected"; + for (var i = 0; i < message.cloudControls.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.cloudControls[i]); + if (error) + return "cloudControls." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCloudControlsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse + */ + ListCloudControlsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse(); + if (object.cloudControls) { + if (!Array.isArray(object.cloudControls)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.cloudControls: array expected"); + message.cloudControls = []; + for (var i = 0; i < object.cloudControls.length; ++i) { + if (typeof object.cloudControls[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.cloudControls: object expected"); + message.cloudControls[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.cloudControls[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCloudControlsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} message ListCloudControlsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCloudControlsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cloudControls = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.cloudControls && message.cloudControls.length) { + object.cloudControls = []; + for (var j = 0; j < message.cloudControls.length; ++j) + object.cloudControls[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.cloudControls[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCloudControlsResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCloudControlsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCloudControlsResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCloudControlsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse"; + }; + + return ListCloudControlsResponse; + })(); + + v1.GetCloudControlRequest = (function() { + + /** + * Properties of a GetCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IGetCloudControlRequest + * @property {string|null} [name] GetCloudControlRequest name + * @property {number|Long|null} [majorRevisionId] GetCloudControlRequest majorRevisionId + */ + + /** + * Constructs a new GetCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a GetCloudControlRequest. + * @implements IGetCloudControlRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest=} [properties] Properties to set + */ + function GetCloudControlRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCloudControlRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @instance + */ + GetCloudControlRequest.prototype.name = ""; + + /** + * GetCloudControlRequest majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @instance + */ + GetCloudControlRequest.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GetCloudControlRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest instance + */ + GetCloudControlRequest.create = function create(properties) { + return new GetCloudControlRequest(properties); + }; + + /** + * Encodes the specified GetCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} message GetCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCloudControlRequest.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); + return writer; + }; + + /** + * Encodes the specified GetCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} message GetCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCloudControlRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCloudControlRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.majorRevisionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCloudControlRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCloudControlRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCloudControlRequest.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + return null; + }; + + /** + * Creates a GetCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest + */ + GetCloudControlRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GetCloudControlRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} message GetCloudControlRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCloudControlRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + return object; + }; + + /** + * Converts this GetCloudControlRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @instance + * @returns {Object.} JSON object + */ + GetCloudControlRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCloudControlRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest"; + }; + + return GetCloudControlRequest; + })(); + + v1.CreateCloudControlRequest = (function() { + + /** + * Properties of a CreateCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICreateCloudControlRequest + * @property {string|null} [parent] CreateCloudControlRequest parent + * @property {string|null} [cloudControlId] CreateCloudControlRequest cloudControlId + * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null} [cloudControl] CreateCloudControlRequest cloudControl + */ + + /** + * Constructs a new CreateCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CreateCloudControlRequest. + * @implements ICreateCloudControlRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest=} [properties] Properties to set + */ + function CreateCloudControlRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCloudControlRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @instance + */ + CreateCloudControlRequest.prototype.parent = ""; + + /** + * CreateCloudControlRequest cloudControlId. + * @member {string} cloudControlId + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @instance + */ + CreateCloudControlRequest.prototype.cloudControlId = ""; + + /** + * CreateCloudControlRequest cloudControl. + * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null|undefined} cloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @instance + */ + CreateCloudControlRequest.prototype.cloudControl = null; + + /** + * Creates a new CreateCloudControlRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest instance + */ + CreateCloudControlRequest.create = function create(properties) { + return new CreateCloudControlRequest(properties); + }; + + /** + * Encodes the specified CreateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} message CreateCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCloudControlRequest.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.cloudControlId != null && Object.hasOwnProperty.call(message, "cloudControlId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudControlId); + if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.cloudControl, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} message CreateCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCloudControlRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCloudControlRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.cloudControlId = reader.string(); + break; + } + case 3: { + message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCloudControlRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCloudControlRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCloudControlRequest.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.cloudControlId != null && message.hasOwnProperty("cloudControlId")) + if (!$util.isString(message.cloudControlId)) + return "cloudControlId: string expected"; + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.cloudControl); + if (error) + return "cloudControl." + error; + } + return null; + }; + + /** + * Creates a CreateCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest + */ + CreateCloudControlRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.cloudControlId != null) + message.cloudControlId = String(object.cloudControlId); + if (object.cloudControl != null) { + if (typeof object.cloudControl !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.cloudControl: object expected"); + message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.cloudControl); + } + return message; + }; + + /** + * Creates a plain object from a CreateCloudControlRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} message CreateCloudControlRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCloudControlRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.cloudControlId = ""; + object.cloudControl = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.cloudControlId != null && message.hasOwnProperty("cloudControlId")) + object.cloudControlId = message.cloudControlId; + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) + object.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.cloudControl, options); + return object; + }; + + /** + * Converts this CreateCloudControlRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCloudControlRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCloudControlRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest"; + }; + + return CreateCloudControlRequest; + })(); + + v1.UpdateCloudControlRequest = (function() { + + /** + * Properties of an UpdateCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IUpdateCloudControlRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCloudControlRequest updateMask + * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null} [cloudControl] UpdateCloudControlRequest cloudControl + */ + + /** + * Constructs a new UpdateCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an UpdateCloudControlRequest. + * @implements IUpdateCloudControlRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest=} [properties] Properties to set + */ + function UpdateCloudControlRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCloudControlRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @instance + */ + UpdateCloudControlRequest.prototype.updateMask = null; + + /** + * UpdateCloudControlRequest cloudControl. + * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null|undefined} cloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @instance + */ + UpdateCloudControlRequest.prototype.cloudControl = null; + + /** + * Creates a new UpdateCloudControlRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest instance + */ + UpdateCloudControlRequest.create = function create(properties) { + return new UpdateCloudControlRequest(properties); + }; + + /** + * Encodes the specified UpdateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} message UpdateCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCloudControlRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.cloudControl, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} message UpdateCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCloudControlRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCloudControlRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCloudControlRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCloudControlRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCloudControlRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.cloudControl); + if (error) + return "cloudControl." + error; + } + return null; + }; + + /** + * Creates an UpdateCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest + */ + UpdateCloudControlRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.cloudControl != null) { + if (typeof object.cloudControl !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.cloudControl: object expected"); + message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.cloudControl); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCloudControlRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} message UpdateCloudControlRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCloudControlRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.cloudControl = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) + object.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.cloudControl, options); + return object; + }; + + /** + * Converts this UpdateCloudControlRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCloudControlRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCloudControlRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest"; + }; + + return UpdateCloudControlRequest; + })(); + + v1.DeleteCloudControlRequest = (function() { + + /** + * Properties of a DeleteCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IDeleteCloudControlRequest + * @property {string|null} [name] DeleteCloudControlRequest name + */ + + /** + * Constructs a new DeleteCloudControlRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a DeleteCloudControlRequest. + * @implements IDeleteCloudControlRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest=} [properties] Properties to set + */ + function DeleteCloudControlRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteCloudControlRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @instance + */ + DeleteCloudControlRequest.prototype.name = ""; + + /** + * Creates a new DeleteCloudControlRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest instance + */ + DeleteCloudControlRequest.create = function create(properties) { + return new DeleteCloudControlRequest(properties); + }; + + /** + * Encodes the specified DeleteCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} message DeleteCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCloudControlRequest.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 DeleteCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} message DeleteCloudControlRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteCloudControlRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCloudControlRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteCloudControlRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteCloudControlRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteCloudControlRequest.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 DeleteCloudControlRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest + */ + DeleteCloudControlRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteCloudControlRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} message DeleteCloudControlRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteCloudControlRequest.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 DeleteCloudControlRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteCloudControlRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteCloudControlRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest"; + }; + + return DeleteCloudControlRequest; + })(); + + v1.Deployment = (function() { + + /** + * Constructs a new Deployment service. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Deployment + * @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 Deployment(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Deployment.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployment; + + /** + * Creates new Deployment service using the specified rpc implementation. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @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 {Deployment} RPC service. Useful where requests and/or responses are streamed. + */ + Deployment.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|createFrameworkDeployment}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @typedef CreateFrameworkDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateFrameworkDeployment. + * @function createFrameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} request CreateFrameworkDeploymentRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeploymentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployment.prototype.createFrameworkDeployment = function createFrameworkDeployment(request, callback) { + return this.rpcCall(createFrameworkDeployment, $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateFrameworkDeployment" }); + + /** + * Calls CreateFrameworkDeployment. + * @function createFrameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} request CreateFrameworkDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|deleteFrameworkDeployment}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @typedef DeleteFrameworkDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFrameworkDeployment. + * @function deleteFrameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} request DeleteFrameworkDeploymentRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeploymentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployment.prototype.deleteFrameworkDeployment = function deleteFrameworkDeployment(request, callback) { + return this.rpcCall(deleteFrameworkDeployment, $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFrameworkDeployment" }); + + /** + * Calls DeleteFrameworkDeployment. + * @function deleteFrameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} request DeleteFrameworkDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getFrameworkDeployment}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @typedef GetFrameworkDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} [response] FrameworkDeployment + */ + + /** + * Calls GetFrameworkDeployment. + * @function getFrameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} request GetFrameworkDeploymentRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeploymentCallback} callback Node-style callback called with the error, if any, and FrameworkDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployment.prototype.getFrameworkDeployment = function getFrameworkDeployment(request, callback) { + return this.rpcCall(getFrameworkDeployment, $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest, $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment, request, callback); + }, "name", { value: "GetFrameworkDeployment" }); + + /** + * Calls GetFrameworkDeployment. + * @function getFrameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} request GetFrameworkDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listFrameworkDeployments}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @typedef ListFrameworkDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} [response] ListFrameworkDeploymentsResponse + */ + + /** + * Calls ListFrameworkDeployments. + * @function listFrameworkDeployments + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} request ListFrameworkDeploymentsRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeploymentsCallback} callback Node-style callback called with the error, if any, and ListFrameworkDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployment.prototype.listFrameworkDeployments = function listFrameworkDeployments(request, callback) { + return this.rpcCall(listFrameworkDeployments, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse, request, callback); + }, "name", { value: "ListFrameworkDeployments" }); + + /** + * Calls ListFrameworkDeployments. + * @function listFrameworkDeployments + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} request ListFrameworkDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getCloudControlDeployment}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @typedef GetCloudControlDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} [response] CloudControlDeployment + */ + + /** + * Calls GetCloudControlDeployment. + * @function getCloudControlDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} request GetCloudControlDeploymentRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeploymentCallback} callback Node-style callback called with the error, if any, and CloudControlDeployment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployment.prototype.getCloudControlDeployment = function getCloudControlDeployment(request, callback) { + return this.rpcCall(getCloudControlDeployment, $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment, request, callback); + }, "name", { value: "GetCloudControlDeployment" }); + + /** + * Calls GetCloudControlDeployment. + * @function getCloudControlDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} request GetCloudControlDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listCloudControlDeployments}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @typedef ListCloudControlDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} [response] ListCloudControlDeploymentsResponse + */ + + /** + * Calls ListCloudControlDeployments. + * @function listCloudControlDeployments + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} request ListCloudControlDeploymentsRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeploymentsCallback} callback Node-style callback called with the error, if any, and ListCloudControlDeploymentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Deployment.prototype.listCloudControlDeployments = function listCloudControlDeployments(request, callback) { + return this.rpcCall(listCloudControlDeployments, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse, request, callback); + }, "name", { value: "ListCloudControlDeployments" }); + + /** + * Calls ListCloudControlDeployments. + * @function listCloudControlDeployments + * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} request ListCloudControlDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Deployment; + })(); + + /** + * DeploymentState enum. + * @name google.cloud.cloudsecuritycompliance.v1.DeploymentState + * @enum {number} + * @property {number} DEPLOYMENT_STATE_UNSPECIFIED=0 DEPLOYMENT_STATE_UNSPECIFIED value + * @property {number} DEPLOYMENT_STATE_VALIDATING=1 DEPLOYMENT_STATE_VALIDATING value + * @property {number} DEPLOYMENT_STATE_CREATING=2 DEPLOYMENT_STATE_CREATING value + * @property {number} DEPLOYMENT_STATE_DELETING=3 DEPLOYMENT_STATE_DELETING value + * @property {number} DEPLOYMENT_STATE_UPDATING=8 DEPLOYMENT_STATE_UPDATING value + * @property {number} DEPLOYMENT_STATE_FAILED=4 DEPLOYMENT_STATE_FAILED value + * @property {number} DEPLOYMENT_STATE_READY=5 DEPLOYMENT_STATE_READY value + * @property {number} DEPLOYMENT_STATE_PARTIALLY_DEPLOYED=6 DEPLOYMENT_STATE_PARTIALLY_DEPLOYED value + * @property {number} DEPLOYMENT_STATE_PARTIALLY_DELETED=7 DEPLOYMENT_STATE_PARTIALLY_DELETED value + */ + v1.DeploymentState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEPLOYMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEPLOYMENT_STATE_VALIDATING"] = 1; + values[valuesById[2] = "DEPLOYMENT_STATE_CREATING"] = 2; + values[valuesById[3] = "DEPLOYMENT_STATE_DELETING"] = 3; + values[valuesById[8] = "DEPLOYMENT_STATE_UPDATING"] = 8; + values[valuesById[4] = "DEPLOYMENT_STATE_FAILED"] = 4; + values[valuesById[5] = "DEPLOYMENT_STATE_READY"] = 5; + values[valuesById[6] = "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED"] = 6; + values[valuesById[7] = "DEPLOYMENT_STATE_PARTIALLY_DELETED"] = 7; + return values; + })(); + + v1.FrameworkDeployment = (function() { + + /** + * Properties of a FrameworkDeployment. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFrameworkDeployment + * @property {string|null} [name] FrameworkDeployment name + * @property {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null} [targetResourceConfig] FrameworkDeployment targetResourceConfig + * @property {string|null} [computedTargetResource] FrameworkDeployment computedTargetResource + * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null} [framework] FrameworkDeployment framework + * @property {string|null} [description] FrameworkDeployment description + * @property {Array.|null} [cloudControlMetadata] FrameworkDeployment cloudControlMetadata + * @property {google.cloud.cloudsecuritycompliance.v1.DeploymentState|null} [deploymentState] FrameworkDeployment deploymentState + * @property {google.protobuf.ITimestamp|null} [createTime] FrameworkDeployment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] FrameworkDeployment updateTime + * @property {string|null} [etag] FrameworkDeployment etag + * @property {string|null} [targetResourceDisplayName] FrameworkDeployment targetResourceDisplayName + * @property {Array.|null} [cloudControlDeploymentReferences] FrameworkDeployment cloudControlDeploymentReferences + */ + + /** + * Constructs a new FrameworkDeployment. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FrameworkDeployment. + * @implements IFrameworkDeployment + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment=} [properties] Properties to set + */ + function FrameworkDeployment(properties) { + this.cloudControlMetadata = []; + this.cloudControlDeploymentReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FrameworkDeployment name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.name = ""; + + /** + * FrameworkDeployment targetResourceConfig. + * @member {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null|undefined} targetResourceConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.targetResourceConfig = null; + + /** + * FrameworkDeployment computedTargetResource. + * @member {string} computedTargetResource + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.computedTargetResource = ""; + + /** + * FrameworkDeployment framework. + * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null|undefined} framework + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.framework = null; + + /** + * FrameworkDeployment description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.description = ""; + + /** + * FrameworkDeployment cloudControlMetadata. + * @member {Array.} cloudControlMetadata + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.cloudControlMetadata = $util.emptyArray; + + /** + * FrameworkDeployment deploymentState. + * @member {google.cloud.cloudsecuritycompliance.v1.DeploymentState} deploymentState + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.deploymentState = 0; + + /** + * FrameworkDeployment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.createTime = null; + + /** + * FrameworkDeployment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.updateTime = null; + + /** + * FrameworkDeployment etag. + * @member {string} etag + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.etag = ""; + + /** + * FrameworkDeployment targetResourceDisplayName. + * @member {string} targetResourceDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.targetResourceDisplayName = ""; + + /** + * FrameworkDeployment cloudControlDeploymentReferences. + * @member {Array.} cloudControlDeploymentReferences + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + */ + FrameworkDeployment.prototype.cloudControlDeploymentReferences = $util.emptyArray; + + /** + * Creates a new FrameworkDeployment instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment instance + */ + FrameworkDeployment.create = function create(properties) { + return new FrameworkDeployment(properties); + }; + + /** + * Encodes the specified FrameworkDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment} message FrameworkDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkDeployment.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.targetResourceConfig != null && Object.hasOwnProperty.call(message, "targetResourceConfig")) + $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.encode(message.targetResourceConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.computedTargetResource != null && Object.hasOwnProperty.call(message, "computedTargetResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.computedTargetResource); + if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.encode(message.framework, 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.cloudControlMetadata != null && message.cloudControlMetadata.length) + for (var i = 0; i < message.cloudControlMetadata.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.encode(message.cloudControlMetadata[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.deploymentState != null && Object.hasOwnProperty.call(message, "deploymentState")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.deploymentState); + 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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.targetResourceDisplayName != null && Object.hasOwnProperty.call(message, "targetResourceDisplayName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.targetResourceDisplayName); + if (message.cloudControlDeploymentReferences != null && message.cloudControlDeploymentReferences.length) + for (var i = 0; i < message.cloudControlDeploymentReferences.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.encode(message.cloudControlDeploymentReferences[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FrameworkDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment} message FrameworkDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkDeployment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrameworkDeployment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkDeployment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.computedTargetResource = reader.string(); + break; + } + case 4: { + message.framework = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + if (!(message.cloudControlMetadata && message.cloudControlMetadata.length)) + message.cloudControlMetadata = []; + message.cloudControlMetadata.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.decode(reader, reader.uint32())); + break; + } + case 7: { + message.deploymentState = reader.int32(); + 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: { + message.etag = reader.string(); + break; + } + case 13: { + message.targetResourceDisplayName = reader.string(); + break; + } + case 14: { + if (!(message.cloudControlDeploymentReferences && message.cloudControlDeploymentReferences.length)) + message.cloudControlDeploymentReferences = []; + message.cloudControlDeploymentReferences.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrameworkDeployment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkDeployment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrameworkDeployment message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrameworkDeployment.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.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify(message.targetResourceConfig); + if (error) + return "targetResourceConfig." + error; + } + if (message.computedTargetResource != null && message.hasOwnProperty("computedTargetResource")) + if (!$util.isString(message.computedTargetResource)) + return "computedTargetResource: string expected"; + if (message.framework != null && message.hasOwnProperty("framework")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify(message.framework); + if (error) + return "framework." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.cloudControlMetadata != null && message.hasOwnProperty("cloudControlMetadata")) { + if (!Array.isArray(message.cloudControlMetadata)) + return "cloudControlMetadata: array expected"; + for (var i = 0; i < message.cloudControlMetadata.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify(message.cloudControlMetadata[i]); + if (error) + return "cloudControlMetadata." + error; + } + } + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + switch (message.deploymentState) { + default: + return "deploymentState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 8: + case 4: + case 5: + case 6: + case 7: + 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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) + if (!$util.isString(message.targetResourceDisplayName)) + return "targetResourceDisplayName: string expected"; + if (message.cloudControlDeploymentReferences != null && message.hasOwnProperty("cloudControlDeploymentReferences")) { + if (!Array.isArray(message.cloudControlDeploymentReferences)) + return "cloudControlDeploymentReferences: array expected"; + for (var i = 0; i < message.cloudControlDeploymentReferences.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify(message.cloudControlDeploymentReferences[i]); + if (error) + return "cloudControlDeploymentReferences." + error; + } + } + return null; + }; + + /** + * Creates a FrameworkDeployment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment + */ + FrameworkDeployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment(); + if (object.name != null) + message.name = String(object.name); + if (object.targetResourceConfig != null) { + if (typeof object.targetResourceConfig !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.targetResourceConfig: object expected"); + message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.fromObject(object.targetResourceConfig); + } + if (object.computedTargetResource != null) + message.computedTargetResource = String(object.computedTargetResource); + if (object.framework != null) { + if (typeof object.framework !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.framework: object expected"); + message.framework = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.fromObject(object.framework); + } + if (object.description != null) + message.description = String(object.description); + if (object.cloudControlMetadata) { + if (!Array.isArray(object.cloudControlMetadata)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlMetadata: array expected"); + message.cloudControlMetadata = []; + for (var i = 0; i < object.cloudControlMetadata.length; ++i) { + if (typeof object.cloudControlMetadata[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlMetadata: object expected"); + message.cloudControlMetadata[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.fromObject(object.cloudControlMetadata[i]); + } + } + switch (object.deploymentState) { + default: + if (typeof object.deploymentState === "number") { + message.deploymentState = object.deploymentState; + break; + } + break; + case "DEPLOYMENT_STATE_UNSPECIFIED": + case 0: + message.deploymentState = 0; + break; + case "DEPLOYMENT_STATE_VALIDATING": + case 1: + message.deploymentState = 1; + break; + case "DEPLOYMENT_STATE_CREATING": + case 2: + message.deploymentState = 2; + break; + case "DEPLOYMENT_STATE_DELETING": + case 3: + message.deploymentState = 3; + break; + case "DEPLOYMENT_STATE_UPDATING": + case 8: + message.deploymentState = 8; + break; + case "DEPLOYMENT_STATE_FAILED": + case 4: + message.deploymentState = 4; + break; + case "DEPLOYMENT_STATE_READY": + case 5: + message.deploymentState = 5; + break; + case "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED": + case 6: + message.deploymentState = 6; + break; + case "DEPLOYMENT_STATE_PARTIALLY_DELETED": + case 7: + message.deploymentState = 7; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.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.cloudsecuritycompliance.v1.FrameworkDeployment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.targetResourceDisplayName != null) + message.targetResourceDisplayName = String(object.targetResourceDisplayName); + if (object.cloudControlDeploymentReferences) { + if (!Array.isArray(object.cloudControlDeploymentReferences)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlDeploymentReferences: array expected"); + message.cloudControlDeploymentReferences = []; + for (var i = 0; i < object.cloudControlDeploymentReferences.length; ++i) { + if (typeof object.cloudControlDeploymentReferences[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlDeploymentReferences: object expected"); + message.cloudControlDeploymentReferences[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.fromObject(object.cloudControlDeploymentReferences[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FrameworkDeployment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} message FrameworkDeployment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrameworkDeployment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.cloudControlMetadata = []; + object.cloudControlDeploymentReferences = []; + } + if (options.defaults) { + object.name = ""; + object.targetResourceConfig = null; + object.computedTargetResource = ""; + object.framework = null; + object.description = ""; + object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.targetResourceDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) + object.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.toObject(message.targetResourceConfig, options); + if (message.computedTargetResource != null && message.hasOwnProperty("computedTargetResource")) + object.computedTargetResource = message.computedTargetResource; + if (message.framework != null && message.hasOwnProperty("framework")) + object.framework = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.toObject(message.framework, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.cloudControlMetadata && message.cloudControlMetadata.length) { + object.cloudControlMetadata = []; + for (var j = 0; j < message.cloudControlMetadata.length; ++j) + object.cloudControlMetadata[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.toObject(message.cloudControlMetadata[j], options); + } + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + object.deploymentState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] === undefined ? message.deploymentState : $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] : message.deploymentState; + 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.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) + object.targetResourceDisplayName = message.targetResourceDisplayName; + if (message.cloudControlDeploymentReferences && message.cloudControlDeploymentReferences.length) { + object.cloudControlDeploymentReferences = []; + for (var j = 0; j < message.cloudControlDeploymentReferences.length; ++j) + object.cloudControlDeploymentReferences[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.toObject(message.cloudControlDeploymentReferences[j], options); + } + return object; + }; + + /** + * Converts this FrameworkDeployment to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @instance + * @returns {Object.} JSON object + */ + FrameworkDeployment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrameworkDeployment + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrameworkDeployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment"; + }; + + return FrameworkDeployment; + })(); + + v1.CloudControlDeployment = (function() { + + /** + * Properties of a CloudControlDeployment. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlDeployment + * @property {string|null} [name] CloudControlDeployment name + * @property {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null} [targetResourceConfig] CloudControlDeployment targetResourceConfig + * @property {string|null} [targetResource] CloudControlDeployment targetResource + * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null} [cloudControlMetadata] CloudControlDeployment cloudControlMetadata + * @property {string|null} [description] CloudControlDeployment description + * @property {google.cloud.cloudsecuritycompliance.v1.DeploymentState|null} [deploymentState] CloudControlDeployment deploymentState + * @property {google.protobuf.ITimestamp|null} [createTime] CloudControlDeployment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] CloudControlDeployment updateTime + * @property {string|null} [etag] CloudControlDeployment etag + * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null} [parameterSubstitutedCloudControl] CloudControlDeployment parameterSubstitutedCloudControl + * @property {Array.|null} [frameworkDeploymentReferences] CloudControlDeployment frameworkDeploymentReferences + * @property {string|null} [targetResourceDisplayName] CloudControlDeployment targetResourceDisplayName + */ + + /** + * Constructs a new CloudControlDeployment. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlDeployment. + * @implements ICloudControlDeployment + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment=} [properties] Properties to set + */ + function CloudControlDeployment(properties) { + this.frameworkDeploymentReferences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlDeployment name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.name = ""; + + /** + * CloudControlDeployment targetResourceConfig. + * @member {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null|undefined} targetResourceConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.targetResourceConfig = null; + + /** + * CloudControlDeployment targetResource. + * @member {string} targetResource + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.targetResource = ""; + + /** + * CloudControlDeployment cloudControlMetadata. + * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null|undefined} cloudControlMetadata + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.cloudControlMetadata = null; + + /** + * CloudControlDeployment description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.description = ""; + + /** + * CloudControlDeployment deploymentState. + * @member {google.cloud.cloudsecuritycompliance.v1.DeploymentState} deploymentState + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.deploymentState = 0; + + /** + * CloudControlDeployment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.createTime = null; + + /** + * CloudControlDeployment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.updateTime = null; + + /** + * CloudControlDeployment etag. + * @member {string} etag + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.etag = ""; + + /** + * CloudControlDeployment parameterSubstitutedCloudControl. + * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null|undefined} parameterSubstitutedCloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.parameterSubstitutedCloudControl = null; + + /** + * CloudControlDeployment frameworkDeploymentReferences. + * @member {Array.} frameworkDeploymentReferences + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.frameworkDeploymentReferences = $util.emptyArray; + + /** + * CloudControlDeployment targetResourceDisplayName. + * @member {string} targetResourceDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + */ + CloudControlDeployment.prototype.targetResourceDisplayName = ""; + + /** + * Creates a new CloudControlDeployment instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment instance + */ + CloudControlDeployment.create = function create(properties) { + return new CloudControlDeployment(properties); + }; + + /** + * Encodes the specified CloudControlDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment} message CloudControlDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlDeployment.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.targetResourceConfig != null && Object.hasOwnProperty.call(message, "targetResourceConfig")) + $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.encode(message.targetResourceConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetResource); + if (message.cloudControlMetadata != null && Object.hasOwnProperty.call(message, "cloudControlMetadata")) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.encode(message.cloudControlMetadata, 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.deploymentState != null && Object.hasOwnProperty.call(message, "deploymentState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.deploymentState); + 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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.parameterSubstitutedCloudControl != null && Object.hasOwnProperty.call(message, "parameterSubstitutedCloudControl")) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.parameterSubstitutedCloudControl, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.frameworkDeploymentReferences != null && message.frameworkDeploymentReferences.length) + for (var i = 0; i < message.frameworkDeploymentReferences.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.encode(message.frameworkDeploymentReferences[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.targetResourceDisplayName != null && Object.hasOwnProperty.call(message, "targetResourceDisplayName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.targetResourceDisplayName); + return writer; + }; + + /** + * Encodes the specified CloudControlDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment} message CloudControlDeployment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlDeployment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlDeployment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlDeployment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.targetResource = reader.string(); + break; + } + case 4: { + message.cloudControlMetadata = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.deploymentState = 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.etag = reader.string(); + break; + } + case 10: { + message.parameterSubstitutedCloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.frameworkDeploymentReferences && message.frameworkDeploymentReferences.length)) + message.frameworkDeploymentReferences = []; + message.frameworkDeploymentReferences.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.decode(reader, reader.uint32())); + break; + } + case 12: { + message.targetResourceDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlDeployment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlDeployment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlDeployment message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlDeployment.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.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify(message.targetResourceConfig); + if (error) + return "targetResourceConfig." + error; + } + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + if (!$util.isString(message.targetResource)) + return "targetResource: string expected"; + if (message.cloudControlMetadata != null && message.hasOwnProperty("cloudControlMetadata")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify(message.cloudControlMetadata); + if (error) + return "cloudControlMetadata." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + switch (message.deploymentState) { + default: + return "deploymentState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 8: + case 4: + case 5: + case 6: + case 7: + 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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.parameterSubstitutedCloudControl != null && message.hasOwnProperty("parameterSubstitutedCloudControl")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.parameterSubstitutedCloudControl); + if (error) + return "parameterSubstitutedCloudControl." + error; + } + if (message.frameworkDeploymentReferences != null && message.hasOwnProperty("frameworkDeploymentReferences")) { + if (!Array.isArray(message.frameworkDeploymentReferences)) + return "frameworkDeploymentReferences: array expected"; + for (var i = 0; i < message.frameworkDeploymentReferences.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify(message.frameworkDeploymentReferences[i]); + if (error) + return "frameworkDeploymentReferences." + error; + } + } + if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) + if (!$util.isString(message.targetResourceDisplayName)) + return "targetResourceDisplayName: string expected"; + return null; + }; + + /** + * Creates a CloudControlDeployment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment + */ + CloudControlDeployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment(); + if (object.name != null) + message.name = String(object.name); + if (object.targetResourceConfig != null) { + if (typeof object.targetResourceConfig !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.targetResourceConfig: object expected"); + message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.fromObject(object.targetResourceConfig); + } + if (object.targetResource != null) + message.targetResource = String(object.targetResource); + if (object.cloudControlMetadata != null) { + if (typeof object.cloudControlMetadata !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.cloudControlMetadata: object expected"); + message.cloudControlMetadata = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.fromObject(object.cloudControlMetadata); + } + if (object.description != null) + message.description = String(object.description); + switch (object.deploymentState) { + default: + if (typeof object.deploymentState === "number") { + message.deploymentState = object.deploymentState; + break; + } + break; + case "DEPLOYMENT_STATE_UNSPECIFIED": + case 0: + message.deploymentState = 0; + break; + case "DEPLOYMENT_STATE_VALIDATING": + case 1: + message.deploymentState = 1; + break; + case "DEPLOYMENT_STATE_CREATING": + case 2: + message.deploymentState = 2; + break; + case "DEPLOYMENT_STATE_DELETING": + case 3: + message.deploymentState = 3; + break; + case "DEPLOYMENT_STATE_UPDATING": + case 8: + message.deploymentState = 8; + break; + case "DEPLOYMENT_STATE_FAILED": + case 4: + message.deploymentState = 4; + break; + case "DEPLOYMENT_STATE_READY": + case 5: + message.deploymentState = 5; + break; + case "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED": + case 6: + message.deploymentState = 6; + break; + case "DEPLOYMENT_STATE_PARTIALLY_DELETED": + case 7: + message.deploymentState = 7; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.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.cloudsecuritycompliance.v1.CloudControlDeployment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.parameterSubstitutedCloudControl != null) { + if (typeof object.parameterSubstitutedCloudControl !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.parameterSubstitutedCloudControl: object expected"); + message.parameterSubstitutedCloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.parameterSubstitutedCloudControl); + } + if (object.frameworkDeploymentReferences) { + if (!Array.isArray(object.frameworkDeploymentReferences)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.frameworkDeploymentReferences: array expected"); + message.frameworkDeploymentReferences = []; + for (var i = 0; i < object.frameworkDeploymentReferences.length; ++i) { + if (typeof object.frameworkDeploymentReferences[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.frameworkDeploymentReferences: object expected"); + message.frameworkDeploymentReferences[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.fromObject(object.frameworkDeploymentReferences[i]); + } + } + if (object.targetResourceDisplayName != null) + message.targetResourceDisplayName = String(object.targetResourceDisplayName); + return message; + }; + + /** + * Creates a plain object from a CloudControlDeployment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} message CloudControlDeployment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlDeployment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.frameworkDeploymentReferences = []; + if (options.defaults) { + object.name = ""; + object.targetResourceConfig = null; + object.targetResource = ""; + object.cloudControlMetadata = null; + object.description = ""; + object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.parameterSubstitutedCloudControl = null; + object.targetResourceDisplayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) + object.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.toObject(message.targetResourceConfig, options); + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = message.targetResource; + if (message.cloudControlMetadata != null && message.hasOwnProperty("cloudControlMetadata")) + object.cloudControlMetadata = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.toObject(message.cloudControlMetadata, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) + object.deploymentState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] === undefined ? message.deploymentState : $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] : message.deploymentState; + 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.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.parameterSubstitutedCloudControl != null && message.hasOwnProperty("parameterSubstitutedCloudControl")) + object.parameterSubstitutedCloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.parameterSubstitutedCloudControl, options); + if (message.frameworkDeploymentReferences && message.frameworkDeploymentReferences.length) { + object.frameworkDeploymentReferences = []; + for (var j = 0; j < message.frameworkDeploymentReferences.length; ++j) + object.frameworkDeploymentReferences[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.toObject(message.frameworkDeploymentReferences[j], options); + } + if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) + object.targetResourceDisplayName = message.targetResourceDisplayName; + return object; + }; + + /** + * Converts this CloudControlDeployment to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @instance + * @returns {Object.} JSON object + */ + CloudControlDeployment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlDeployment + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlDeployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment"; + }; + + return CloudControlDeployment; + })(); + + v1.TargetResourceConfig = (function() { + + /** + * Properties of a TargetResourceConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ITargetResourceConfig + * @property {string|null} [existingTargetResource] TargetResourceConfig existingTargetResource + * @property {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null} [targetResourceCreationConfig] TargetResourceConfig targetResourceCreationConfig + */ + + /** + * Constructs a new TargetResourceConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a TargetResourceConfig. + * @implements ITargetResourceConfig + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig=} [properties] Properties to set + */ + function TargetResourceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetResourceConfig existingTargetResource. + * @member {string|null|undefined} existingTargetResource + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @instance + */ + TargetResourceConfig.prototype.existingTargetResource = null; + + /** + * TargetResourceConfig targetResourceCreationConfig. + * @member {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null|undefined} targetResourceCreationConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @instance + */ + TargetResourceConfig.prototype.targetResourceCreationConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetResourceConfig resourceConfig. + * @member {"existingTargetResource"|"targetResourceCreationConfig"|undefined} resourceConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @instance + */ + Object.defineProperty(TargetResourceConfig.prototype, "resourceConfig", { + get: $util.oneOfGetter($oneOfFields = ["existingTargetResource", "targetResourceCreationConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetResourceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig instance + */ + TargetResourceConfig.create = function create(properties) { + return new TargetResourceConfig(properties); + }; + + /** + * Encodes the specified TargetResourceConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig} message TargetResourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResourceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.existingTargetResource != null && Object.hasOwnProperty.call(message, "existingTargetResource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.existingTargetResource); + if (message.targetResourceCreationConfig != null && Object.hasOwnProperty.call(message, "targetResourceCreationConfig")) + $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.encode(message.targetResourceCreationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetResourceConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig} message TargetResourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetResourceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResourceConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.existingTargetResource = reader.string(); + break; + } + case 2: { + message.targetResourceCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetResourceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResourceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetResourceConfig message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetResourceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.existingTargetResource != null && message.hasOwnProperty("existingTargetResource")) { + properties.resourceConfig = 1; + if (!$util.isString(message.existingTargetResource)) + return "existingTargetResource: string expected"; + } + if (message.targetResourceCreationConfig != null && message.hasOwnProperty("targetResourceCreationConfig")) { + if (properties.resourceConfig === 1) + return "resourceConfig: multiple values"; + properties.resourceConfig = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify(message.targetResourceCreationConfig); + if (error) + return "targetResourceCreationConfig." + error; + } + } + return null; + }; + + /** + * Creates a TargetResourceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig + */ + TargetResourceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig(); + if (object.existingTargetResource != null) + message.existingTargetResource = String(object.existingTargetResource); + if (object.targetResourceCreationConfig != null) { + if (typeof object.targetResourceCreationConfig !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.targetResourceCreationConfig: object expected"); + message.targetResourceCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.fromObject(object.targetResourceCreationConfig); + } + return message; + }; + + /** + * Creates a plain object from a TargetResourceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} message TargetResourceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetResourceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.existingTargetResource != null && message.hasOwnProperty("existingTargetResource")) { + object.existingTargetResource = message.existingTargetResource; + if (options.oneofs) + object.resourceConfig = "existingTargetResource"; + } + if (message.targetResourceCreationConfig != null && message.hasOwnProperty("targetResourceCreationConfig")) { + object.targetResourceCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.toObject(message.targetResourceCreationConfig, options); + if (options.oneofs) + object.resourceConfig = "targetResourceCreationConfig"; + } + return object; + }; + + /** + * Converts this TargetResourceConfig to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @instance + * @returns {Object.} JSON object + */ + TargetResourceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetResourceConfig + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig"; + }; + + return TargetResourceConfig; + })(); + + v1.TargetResourceCreationConfig = (function() { + + /** + * Properties of a TargetResourceCreationConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ITargetResourceCreationConfig + * @property {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null} [folderCreationConfig] TargetResourceCreationConfig folderCreationConfig + * @property {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null} [projectCreationConfig] TargetResourceCreationConfig projectCreationConfig + */ + + /** + * Constructs a new TargetResourceCreationConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a TargetResourceCreationConfig. + * @implements ITargetResourceCreationConfig + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig=} [properties] Properties to set + */ + function TargetResourceCreationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetResourceCreationConfig folderCreationConfig. + * @member {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null|undefined} folderCreationConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @instance + */ + TargetResourceCreationConfig.prototype.folderCreationConfig = null; + + /** + * TargetResourceCreationConfig projectCreationConfig. + * @member {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null|undefined} projectCreationConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @instance + */ + TargetResourceCreationConfig.prototype.projectCreationConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetResourceCreationConfig resourceCreationConfig. + * @member {"folderCreationConfig"|"projectCreationConfig"|undefined} resourceCreationConfig + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @instance + */ + Object.defineProperty(TargetResourceCreationConfig.prototype, "resourceCreationConfig", { + get: $util.oneOfGetter($oneOfFields = ["folderCreationConfig", "projectCreationConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetResourceCreationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig instance + */ + TargetResourceCreationConfig.create = function create(properties) { + return new TargetResourceCreationConfig(properties); + }; + + /** + * Encodes the specified TargetResourceCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig} message TargetResourceCreationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResourceCreationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.folderCreationConfig != null && Object.hasOwnProperty.call(message, "folderCreationConfig")) + $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.encode(message.folderCreationConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.projectCreationConfig != null && Object.hasOwnProperty.call(message, "projectCreationConfig")) + $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.encode(message.projectCreationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetResourceCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig} message TargetResourceCreationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResourceCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetResourceCreationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResourceCreationConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.folderCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.projectCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetResourceCreationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResourceCreationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetResourceCreationConfig message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetResourceCreationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.folderCreationConfig != null && message.hasOwnProperty("folderCreationConfig")) { + properties.resourceCreationConfig = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify(message.folderCreationConfig); + if (error) + return "folderCreationConfig." + error; + } + } + if (message.projectCreationConfig != null && message.hasOwnProperty("projectCreationConfig")) { + if (properties.resourceCreationConfig === 1) + return "resourceCreationConfig: multiple values"; + properties.resourceCreationConfig = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify(message.projectCreationConfig); + if (error) + return "projectCreationConfig." + error; + } + } + return null; + }; + + /** + * Creates a TargetResourceCreationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig + */ + TargetResourceCreationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig(); + if (object.folderCreationConfig != null) { + if (typeof object.folderCreationConfig !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.folderCreationConfig: object expected"); + message.folderCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.fromObject(object.folderCreationConfig); + } + if (object.projectCreationConfig != null) { + if (typeof object.projectCreationConfig !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.projectCreationConfig: object expected"); + message.projectCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.fromObject(object.projectCreationConfig); + } + return message; + }; + + /** + * Creates a plain object from a TargetResourceCreationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} message TargetResourceCreationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetResourceCreationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.folderCreationConfig != null && message.hasOwnProperty("folderCreationConfig")) { + object.folderCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.toObject(message.folderCreationConfig, options); + if (options.oneofs) + object.resourceCreationConfig = "folderCreationConfig"; + } + if (message.projectCreationConfig != null && message.hasOwnProperty("projectCreationConfig")) { + object.projectCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.toObject(message.projectCreationConfig, options); + if (options.oneofs) + object.resourceCreationConfig = "projectCreationConfig"; + } + return object; + }; + + /** + * Converts this TargetResourceCreationConfig to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @instance + * @returns {Object.} JSON object + */ + TargetResourceCreationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetResourceCreationConfig + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResourceCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig"; + }; + + return TargetResourceCreationConfig; + })(); + + v1.FolderCreationConfig = (function() { + + /** + * Properties of a FolderCreationConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFolderCreationConfig + * @property {string|null} [parent] FolderCreationConfig parent + * @property {string|null} [folderDisplayName] FolderCreationConfig folderDisplayName + */ + + /** + * Constructs a new FolderCreationConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FolderCreationConfig. + * @implements IFolderCreationConfig + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig=} [properties] Properties to set + */ + function FolderCreationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FolderCreationConfig parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @instance + */ + FolderCreationConfig.prototype.parent = ""; + + /** + * FolderCreationConfig folderDisplayName. + * @member {string} folderDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @instance + */ + FolderCreationConfig.prototype.folderDisplayName = ""; + + /** + * Creates a new FolderCreationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig instance + */ + FolderCreationConfig.create = function create(properties) { + return new FolderCreationConfig(properties); + }; + + /** + * Encodes the specified FolderCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig} message FolderCreationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FolderCreationConfig.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.folderDisplayName != null && Object.hasOwnProperty.call(message, "folderDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.folderDisplayName); + return writer; + }; + + /** + * Encodes the specified FolderCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig} message FolderCreationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FolderCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FolderCreationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FolderCreationConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.folderDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FolderCreationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FolderCreationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FolderCreationConfig message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FolderCreationConfig.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.folderDisplayName != null && message.hasOwnProperty("folderDisplayName")) + if (!$util.isString(message.folderDisplayName)) + return "folderDisplayName: string expected"; + return null; + }; + + /** + * Creates a FolderCreationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig + */ + FolderCreationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.folderDisplayName != null) + message.folderDisplayName = String(object.folderDisplayName); + return message; + }; + + /** + * Creates a plain object from a FolderCreationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} message FolderCreationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FolderCreationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.folderDisplayName = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.folderDisplayName != null && message.hasOwnProperty("folderDisplayName")) + object.folderDisplayName = message.folderDisplayName; + return object; + }; + + /** + * Converts this FolderCreationConfig to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @instance + * @returns {Object.} JSON object + */ + FolderCreationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FolderCreationConfig + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FolderCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig"; + }; + + return FolderCreationConfig; + })(); + + v1.ProjectCreationConfig = (function() { + + /** + * Properties of a ProjectCreationConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IProjectCreationConfig + * @property {string|null} [parent] ProjectCreationConfig parent + * @property {string|null} [projectDisplayName] ProjectCreationConfig projectDisplayName + * @property {string|null} [billingAccountId] ProjectCreationConfig billingAccountId + */ + + /** + * Constructs a new ProjectCreationConfig. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ProjectCreationConfig. + * @implements IProjectCreationConfig + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig=} [properties] Properties to set + */ + function ProjectCreationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProjectCreationConfig parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @instance + */ + ProjectCreationConfig.prototype.parent = ""; + + /** + * ProjectCreationConfig projectDisplayName. + * @member {string} projectDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @instance + */ + ProjectCreationConfig.prototype.projectDisplayName = ""; + + /** + * ProjectCreationConfig billingAccountId. + * @member {string} billingAccountId + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @instance + */ + ProjectCreationConfig.prototype.billingAccountId = ""; + + /** + * Creates a new ProjectCreationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig instance + */ + ProjectCreationConfig.create = function create(properties) { + return new ProjectCreationConfig(properties); + }; + + /** + * Encodes the specified ProjectCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig} message ProjectCreationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectCreationConfig.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.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectDisplayName); + if (message.billingAccountId != null && Object.hasOwnProperty.call(message, "billingAccountId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.billingAccountId); + return writer; + }; + + /** + * Encodes the specified ProjectCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig} message ProjectCreationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProjectCreationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectCreationConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.projectDisplayName = reader.string(); + break; + } + case 3: { + message.billingAccountId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProjectCreationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectCreationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProjectCreationConfig message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProjectCreationConfig.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.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + if (!$util.isString(message.projectDisplayName)) + return "projectDisplayName: string expected"; + if (message.billingAccountId != null && message.hasOwnProperty("billingAccountId")) + if (!$util.isString(message.billingAccountId)) + return "billingAccountId: string expected"; + return null; + }; + + /** + * Creates a ProjectCreationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig + */ + ProjectCreationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.projectDisplayName != null) + message.projectDisplayName = String(object.projectDisplayName); + if (object.billingAccountId != null) + message.billingAccountId = String(object.billingAccountId); + return message; + }; + + /** + * Creates a plain object from a ProjectCreationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} message ProjectCreationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProjectCreationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.projectDisplayName = ""; + object.billingAccountId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + object.projectDisplayName = message.projectDisplayName; + if (message.billingAccountId != null && message.hasOwnProperty("billingAccountId")) + object.billingAccountId = message.billingAccountId; + return object; + }; + + /** + * Converts this ProjectCreationConfig to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @instance + * @returns {Object.} JSON object + */ + ProjectCreationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProjectCreationConfig + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProjectCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig"; + }; + + return ProjectCreationConfig; + })(); + + v1.CloudControlMetadata = (function() { + + /** + * Properties of a CloudControlMetadata. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlMetadata + * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null} [cloudControlDetails] CloudControlMetadata cloudControlDetails + * @property {google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null} [enforcementMode] CloudControlMetadata enforcementMode + */ + + /** + * Constructs a new CloudControlMetadata. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlMetadata. + * @implements ICloudControlMetadata + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata=} [properties] Properties to set + */ + function CloudControlMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlMetadata cloudControlDetails. + * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null|undefined} cloudControlDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @instance + */ + CloudControlMetadata.prototype.cloudControlDetails = null; + + /** + * CloudControlMetadata enforcementMode. + * @member {google.cloud.cloudsecuritycompliance.v1.EnforcementMode} enforcementMode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @instance + */ + CloudControlMetadata.prototype.enforcementMode = 0; + + /** + * Creates a new CloudControlMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata instance + */ + CloudControlMetadata.create = function create(properties) { + return new CloudControlMetadata(properties); + }; + + /** + * Encodes the specified CloudControlMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata} message CloudControlMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudControlDetails != null && Object.hasOwnProperty.call(message, "cloudControlDetails")) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.encode(message.cloudControlDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enforcementMode != null && Object.hasOwnProperty.call(message, "enforcementMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enforcementMode); + return writer; + }; + + /** + * Encodes the specified CloudControlMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata} message CloudControlMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cloudControlDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.decode(reader, reader.uint32()); + break; + } + case 2: { + message.enforcementMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlMetadata message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify(message.cloudControlDetails); + if (error) + return "cloudControlDetails." + error; + } + if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) + switch (message.enforcementMode) { + default: + return "enforcementMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a CloudControlMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata + */ + CloudControlMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata(); + if (object.cloudControlDetails != null) { + if (typeof object.cloudControlDetails !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.cloudControlDetails: object expected"); + message.cloudControlDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.fromObject(object.cloudControlDetails); + } + switch (object.enforcementMode) { + default: + if (typeof object.enforcementMode === "number") { + message.enforcementMode = object.enforcementMode; + break; + } + break; + case "ENFORCEMENT_MODE_UNSPECIFIED": + case 0: + message.enforcementMode = 0; + break; + case "PREVENTIVE": + case 1: + message.enforcementMode = 1; + break; + case "DETECTIVE": + case 2: + message.enforcementMode = 2; + break; + case "AUDIT": + case 3: + message.enforcementMode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a CloudControlMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} message CloudControlMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cloudControlDetails = null; + object.enforcementMode = options.enums === String ? "ENFORCEMENT_MODE_UNSPECIFIED" : 0; + } + if (message.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) + object.cloudControlDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.toObject(message.cloudControlDetails, options); + if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) + object.enforcementMode = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] === undefined ? message.enforcementMode : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] : message.enforcementMode; + return object; + }; + + /** + * Converts this CloudControlMetadata to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @instance + * @returns {Object.} JSON object + */ + CloudControlMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlMetadata + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata"; + }; + + return CloudControlMetadata; + })(); + + v1.CreateFrameworkDeploymentRequest = (function() { + + /** + * Properties of a CreateFrameworkDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICreateFrameworkDeploymentRequest + * @property {string|null} [parent] CreateFrameworkDeploymentRequest parent + * @property {string|null} [frameworkDeploymentId] CreateFrameworkDeploymentRequest frameworkDeploymentId + * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null} [frameworkDeployment] CreateFrameworkDeploymentRequest frameworkDeployment + */ + + /** + * Constructs a new CreateFrameworkDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CreateFrameworkDeploymentRequest. + * @implements ICreateFrameworkDeploymentRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest=} [properties] Properties to set + */ + function CreateFrameworkDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFrameworkDeploymentRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @instance + */ + CreateFrameworkDeploymentRequest.prototype.parent = ""; + + /** + * CreateFrameworkDeploymentRequest frameworkDeploymentId. + * @member {string} frameworkDeploymentId + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @instance + */ + CreateFrameworkDeploymentRequest.prototype.frameworkDeploymentId = ""; + + /** + * CreateFrameworkDeploymentRequest frameworkDeployment. + * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null|undefined} frameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @instance + */ + CreateFrameworkDeploymentRequest.prototype.frameworkDeployment = null; + + /** + * Creates a new CreateFrameworkDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest instance + */ + CreateFrameworkDeploymentRequest.create = function create(properties) { + return new CreateFrameworkDeploymentRequest(properties); + }; + + /** + * Encodes the specified CreateFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} message CreateFrameworkDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFrameworkDeploymentRequest.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.frameworkDeploymentId != null && Object.hasOwnProperty.call(message, "frameworkDeploymentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkDeploymentId); + if (message.frameworkDeployment != null && Object.hasOwnProperty.call(message, "frameworkDeployment")) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.encode(message.frameworkDeployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} message CreateFrameworkDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFrameworkDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFrameworkDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.frameworkDeploymentId = reader.string(); + break; + } + case 3: { + message.frameworkDeployment = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFrameworkDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFrameworkDeploymentRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFrameworkDeploymentRequest.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.frameworkDeploymentId != null && message.hasOwnProperty("frameworkDeploymentId")) + if (!$util.isString(message.frameworkDeploymentId)) + return "frameworkDeploymentId: string expected"; + if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify(message.frameworkDeployment); + if (error) + return "frameworkDeployment." + error; + } + return null; + }; + + /** + * Creates a CreateFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest + */ + CreateFrameworkDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.frameworkDeploymentId != null) + message.frameworkDeploymentId = String(object.frameworkDeploymentId); + if (object.frameworkDeployment != null) { + if (typeof object.frameworkDeployment !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.frameworkDeployment: object expected"); + message.frameworkDeployment = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.fromObject(object.frameworkDeployment); + } + return message; + }; + + /** + * Creates a plain object from a CreateFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} message CreateFrameworkDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFrameworkDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.frameworkDeploymentId = ""; + object.frameworkDeployment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.frameworkDeploymentId != null && message.hasOwnProperty("frameworkDeploymentId")) + object.frameworkDeploymentId = message.frameworkDeploymentId; + if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) + object.frameworkDeployment = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.toObject(message.frameworkDeployment, options); + return object; + }; + + /** + * Converts this CreateFrameworkDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFrameworkDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFrameworkDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFrameworkDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest"; + }; + + return CreateFrameworkDeploymentRequest; + })(); + + v1.DeleteFrameworkDeploymentRequest = (function() { + + /** + * Properties of a DeleteFrameworkDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IDeleteFrameworkDeploymentRequest + * @property {string|null} [name] DeleteFrameworkDeploymentRequest name + * @property {string|null} [etag] DeleteFrameworkDeploymentRequest etag + */ + + /** + * Constructs a new DeleteFrameworkDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a DeleteFrameworkDeploymentRequest. + * @implements IDeleteFrameworkDeploymentRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest=} [properties] Properties to set + */ + function DeleteFrameworkDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFrameworkDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @instance + */ + DeleteFrameworkDeploymentRequest.prototype.name = ""; + + /** + * DeleteFrameworkDeploymentRequest etag. + * @member {string} etag + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @instance + */ + DeleteFrameworkDeploymentRequest.prototype.etag = ""; + + /** + * Creates a new DeleteFrameworkDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest instance + */ + DeleteFrameworkDeploymentRequest.create = function create(properties) { + return new DeleteFrameworkDeploymentRequest(properties); + }; + + /** + * Encodes the specified DeleteFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} message DeleteFrameworkDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFrameworkDeploymentRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} message DeleteFrameworkDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFrameworkDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFrameworkDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFrameworkDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFrameworkDeploymentRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFrameworkDeploymentRequest.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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest + */ + DeleteFrameworkDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} message DeleteFrameworkDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFrameworkDeploymentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteFrameworkDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFrameworkDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFrameworkDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFrameworkDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest"; + }; + + return DeleteFrameworkDeploymentRequest; + })(); + + v1.GetFrameworkDeploymentRequest = (function() { + + /** + * Properties of a GetFrameworkDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IGetFrameworkDeploymentRequest + * @property {string|null} [name] GetFrameworkDeploymentRequest name + */ + + /** + * Constructs a new GetFrameworkDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a GetFrameworkDeploymentRequest. + * @implements IGetFrameworkDeploymentRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest=} [properties] Properties to set + */ + function GetFrameworkDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFrameworkDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @instance + */ + GetFrameworkDeploymentRequest.prototype.name = ""; + + /** + * Creates a new GetFrameworkDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest instance + */ + GetFrameworkDeploymentRequest.create = function create(properties) { + return new GetFrameworkDeploymentRequest(properties); + }; + + /** + * Encodes the specified GetFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} message GetFrameworkDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFrameworkDeploymentRequest.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 GetFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} message GetFrameworkDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFrameworkDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFrameworkDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFrameworkDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFrameworkDeploymentRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFrameworkDeploymentRequest.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 GetFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest + */ + GetFrameworkDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFrameworkDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} message GetFrameworkDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFrameworkDeploymentRequest.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 GetFrameworkDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + GetFrameworkDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFrameworkDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFrameworkDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest"; + }; + + return GetFrameworkDeploymentRequest; + })(); + + v1.ListFrameworkDeploymentsRequest = (function() { + + /** + * Properties of a ListFrameworkDeploymentsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworkDeploymentsRequest + * @property {string|null} [parent] ListFrameworkDeploymentsRequest parent + * @property {number|null} [pageSize] ListFrameworkDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListFrameworkDeploymentsRequest pageToken + * @property {string|null} [filter] ListFrameworkDeploymentsRequest filter + * @property {string|null} [orderBy] ListFrameworkDeploymentsRequest orderBy + */ + + /** + * Constructs a new ListFrameworkDeploymentsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworkDeploymentsRequest. + * @implements IListFrameworkDeploymentsRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest=} [properties] Properties to set + */ + function ListFrameworkDeploymentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworkDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @instance + */ + ListFrameworkDeploymentsRequest.prototype.parent = ""; + + /** + * ListFrameworkDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @instance + */ + ListFrameworkDeploymentsRequest.prototype.pageSize = 0; + + /** + * ListFrameworkDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @instance + */ + ListFrameworkDeploymentsRequest.prototype.pageToken = ""; + + /** + * ListFrameworkDeploymentsRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @instance + */ + ListFrameworkDeploymentsRequest.prototype.filter = ""; + + /** + * ListFrameworkDeploymentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @instance + */ + ListFrameworkDeploymentsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListFrameworkDeploymentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest instance + */ + ListFrameworkDeploymentsRequest.create = function create(properties) { + return new ListFrameworkDeploymentsRequest(properties); + }; + + /** + * Encodes the specified ListFrameworkDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} message ListFrameworkDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkDeploymentsRequest.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 ListFrameworkDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} message ListFrameworkDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkDeploymentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 ListFrameworkDeploymentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworkDeploymentsRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworkDeploymentsRequest.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 ListFrameworkDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest + */ + ListFrameworkDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest(); + 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 ListFrameworkDeploymentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} message ListFrameworkDeploymentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworkDeploymentsRequest.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 ListFrameworkDeploymentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListFrameworkDeploymentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworkDeploymentsRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworkDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest"; + }; + + return ListFrameworkDeploymentsRequest; + })(); + + v1.ListFrameworkDeploymentsResponse = (function() { + + /** + * Properties of a ListFrameworkDeploymentsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworkDeploymentsResponse + * @property {Array.|null} [frameworkDeployments] ListFrameworkDeploymentsResponse frameworkDeployments + * @property {string|null} [nextPageToken] ListFrameworkDeploymentsResponse nextPageToken + */ + + /** + * Constructs a new ListFrameworkDeploymentsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworkDeploymentsResponse. + * @implements IListFrameworkDeploymentsResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse=} [properties] Properties to set + */ + function ListFrameworkDeploymentsResponse(properties) { + this.frameworkDeployments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworkDeploymentsResponse frameworkDeployments. + * @member {Array.} frameworkDeployments + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @instance + */ + ListFrameworkDeploymentsResponse.prototype.frameworkDeployments = $util.emptyArray; + + /** + * ListFrameworkDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @instance + */ + ListFrameworkDeploymentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFrameworkDeploymentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse instance + */ + ListFrameworkDeploymentsResponse.create = function create(properties) { + return new ListFrameworkDeploymentsResponse(properties); + }; + + /** + * Encodes the specified ListFrameworkDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse} message ListFrameworkDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkDeploymentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frameworkDeployments != null && message.frameworkDeployments.length) + for (var i = 0; i < message.frameworkDeployments.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.encode(message.frameworkDeployments[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 ListFrameworkDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse} message ListFrameworkDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkDeploymentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.frameworkDeployments && message.frameworkDeployments.length)) + message.frameworkDeployments = []; + message.frameworkDeployments.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworkDeploymentsResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworkDeploymentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frameworkDeployments != null && message.hasOwnProperty("frameworkDeployments")) { + if (!Array.isArray(message.frameworkDeployments)) + return "frameworkDeployments: array expected"; + for (var i = 0; i < message.frameworkDeployments.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify(message.frameworkDeployments[i]); + if (error) + return "frameworkDeployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFrameworkDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse + */ + ListFrameworkDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse(); + if (object.frameworkDeployments) { + if (!Array.isArray(object.frameworkDeployments)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.frameworkDeployments: array expected"); + message.frameworkDeployments = []; + for (var i = 0; i < object.frameworkDeployments.length; ++i) { + if (typeof object.frameworkDeployments[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.frameworkDeployments: object expected"); + message.frameworkDeployments[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.fromObject(object.frameworkDeployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFrameworkDeploymentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} message ListFrameworkDeploymentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworkDeploymentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.frameworkDeployments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.frameworkDeployments && message.frameworkDeployments.length) { + object.frameworkDeployments = []; + for (var j = 0; j < message.frameworkDeployments.length; ++j) + object.frameworkDeployments[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.toObject(message.frameworkDeployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFrameworkDeploymentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListFrameworkDeploymentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworkDeploymentsResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworkDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse"; + }; + + return ListFrameworkDeploymentsResponse; + })(); + + v1.GetCloudControlDeploymentRequest = (function() { + + /** + * Properties of a GetCloudControlDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IGetCloudControlDeploymentRequest + * @property {string|null} [name] GetCloudControlDeploymentRequest name + */ + + /** + * Constructs a new GetCloudControlDeploymentRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a GetCloudControlDeploymentRequest. + * @implements IGetCloudControlDeploymentRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest=} [properties] Properties to set + */ + function GetCloudControlDeploymentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCloudControlDeploymentRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @instance + */ + GetCloudControlDeploymentRequest.prototype.name = ""; + + /** + * Creates a new GetCloudControlDeploymentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest instance + */ + GetCloudControlDeploymentRequest.create = function create(properties) { + return new GetCloudControlDeploymentRequest(properties); + }; + + /** + * Encodes the specified GetCloudControlDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} message GetCloudControlDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCloudControlDeploymentRequest.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 GetCloudControlDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} message GetCloudControlDeploymentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCloudControlDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCloudControlDeploymentRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCloudControlDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCloudControlDeploymentRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCloudControlDeploymentRequest.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 GetCloudControlDeploymentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest + */ + GetCloudControlDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCloudControlDeploymentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} message GetCloudControlDeploymentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCloudControlDeploymentRequest.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 GetCloudControlDeploymentRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @instance + * @returns {Object.} JSON object + */ + GetCloudControlDeploymentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCloudControlDeploymentRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCloudControlDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest"; + }; + + return GetCloudControlDeploymentRequest; + })(); + + v1.ListCloudControlDeploymentsRequest = (function() { + + /** + * Properties of a ListCloudControlDeploymentsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListCloudControlDeploymentsRequest + * @property {string|null} [parent] ListCloudControlDeploymentsRequest parent + * @property {number|null} [pageSize] ListCloudControlDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListCloudControlDeploymentsRequest pageToken + * @property {string|null} [filter] ListCloudControlDeploymentsRequest filter + * @property {string|null} [orderBy] ListCloudControlDeploymentsRequest orderBy + */ + + /** + * Constructs a new ListCloudControlDeploymentsRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListCloudControlDeploymentsRequest. + * @implements IListCloudControlDeploymentsRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest=} [properties] Properties to set + */ + function ListCloudControlDeploymentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCloudControlDeploymentsRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @instance + */ + ListCloudControlDeploymentsRequest.prototype.parent = ""; + + /** + * ListCloudControlDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @instance + */ + ListCloudControlDeploymentsRequest.prototype.pageSize = 0; + + /** + * ListCloudControlDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @instance + */ + ListCloudControlDeploymentsRequest.prototype.pageToken = ""; + + /** + * ListCloudControlDeploymentsRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @instance + */ + ListCloudControlDeploymentsRequest.prototype.filter = ""; + + /** + * ListCloudControlDeploymentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @instance + */ + ListCloudControlDeploymentsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCloudControlDeploymentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest instance + */ + ListCloudControlDeploymentsRequest.create = function create(properties) { + return new ListCloudControlDeploymentsRequest(properties); + }; + + /** + * Encodes the specified ListCloudControlDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} message ListCloudControlDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlDeploymentsRequest.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 ListCloudControlDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} message ListCloudControlDeploymentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlDeploymentsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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 ListCloudControlDeploymentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCloudControlDeploymentsRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCloudControlDeploymentsRequest.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 ListCloudControlDeploymentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest + */ + ListCloudControlDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest(); + 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 ListCloudControlDeploymentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} message ListCloudControlDeploymentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCloudControlDeploymentsRequest.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 ListCloudControlDeploymentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCloudControlDeploymentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCloudControlDeploymentsRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCloudControlDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest"; + }; + + return ListCloudControlDeploymentsRequest; + })(); + + v1.ListCloudControlDeploymentsResponse = (function() { + + /** + * Properties of a ListCloudControlDeploymentsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListCloudControlDeploymentsResponse + * @property {Array.|null} [cloudControlDeployments] ListCloudControlDeploymentsResponse cloudControlDeployments + * @property {string|null} [nextPageToken] ListCloudControlDeploymentsResponse nextPageToken + */ + + /** + * Constructs a new ListCloudControlDeploymentsResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListCloudControlDeploymentsResponse. + * @implements IListCloudControlDeploymentsResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse=} [properties] Properties to set + */ + function ListCloudControlDeploymentsResponse(properties) { + this.cloudControlDeployments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCloudControlDeploymentsResponse cloudControlDeployments. + * @member {Array.} cloudControlDeployments + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @instance + */ + ListCloudControlDeploymentsResponse.prototype.cloudControlDeployments = $util.emptyArray; + + /** + * ListCloudControlDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @instance + */ + ListCloudControlDeploymentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCloudControlDeploymentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse instance + */ + ListCloudControlDeploymentsResponse.create = function create(properties) { + return new ListCloudControlDeploymentsResponse(properties); + }; + + /** + * Encodes the specified ListCloudControlDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse} message ListCloudControlDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlDeploymentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudControlDeployments != null && message.cloudControlDeployments.length) + for (var i = 0; i < message.cloudControlDeployments.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.encode(message.cloudControlDeployments[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 ListCloudControlDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse} message ListCloudControlDeploymentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCloudControlDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlDeploymentsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.cloudControlDeployments && message.cloudControlDeployments.length)) + message.cloudControlDeployments = []; + message.cloudControlDeployments.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCloudControlDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCloudControlDeploymentsResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCloudControlDeploymentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudControlDeployments != null && message.hasOwnProperty("cloudControlDeployments")) { + if (!Array.isArray(message.cloudControlDeployments)) + return "cloudControlDeployments: array expected"; + for (var i = 0; i < message.cloudControlDeployments.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify(message.cloudControlDeployments[i]); + if (error) + return "cloudControlDeployments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCloudControlDeploymentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse + */ + ListCloudControlDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse(); + if (object.cloudControlDeployments) { + if (!Array.isArray(object.cloudControlDeployments)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.cloudControlDeployments: array expected"); + message.cloudControlDeployments = []; + for (var i = 0; i < object.cloudControlDeployments.length; ++i) { + if (typeof object.cloudControlDeployments[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.cloudControlDeployments: object expected"); + message.cloudControlDeployments[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.fromObject(object.cloudControlDeployments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCloudControlDeploymentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} message ListCloudControlDeploymentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCloudControlDeploymentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cloudControlDeployments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.cloudControlDeployments && message.cloudControlDeployments.length) { + object.cloudControlDeployments = []; + for (var j = 0; j < message.cloudControlDeployments.length; ++j) + object.cloudControlDeployments[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.toObject(message.cloudControlDeployments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCloudControlDeploymentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCloudControlDeploymentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCloudControlDeploymentsResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCloudControlDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse"; + }; + + return ListCloudControlDeploymentsResponse; + })(); + + v1.CloudControlDeploymentReference = (function() { + + /** + * Properties of a CloudControlDeploymentReference. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlDeploymentReference + * @property {string|null} [cloudControlDeployment] CloudControlDeploymentReference cloudControlDeployment + */ + + /** + * Constructs a new CloudControlDeploymentReference. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlDeploymentReference. + * @implements ICloudControlDeploymentReference + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference=} [properties] Properties to set + */ + function CloudControlDeploymentReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlDeploymentReference cloudControlDeployment. + * @member {string} cloudControlDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @instance + */ + CloudControlDeploymentReference.prototype.cloudControlDeployment = ""; + + /** + * Creates a new CloudControlDeploymentReference instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference instance + */ + CloudControlDeploymentReference.create = function create(properties) { + return new CloudControlDeploymentReference(properties); + }; + + /** + * Encodes the specified CloudControlDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference} message CloudControlDeploymentReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlDeploymentReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudControlDeployment != null && Object.hasOwnProperty.call(message, "cloudControlDeployment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControlDeployment); + return writer; + }; + + /** + * Encodes the specified CloudControlDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference} message CloudControlDeploymentReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlDeploymentReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlDeploymentReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlDeploymentReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cloudControlDeployment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlDeploymentReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlDeploymentReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlDeploymentReference message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlDeploymentReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) + if (!$util.isString(message.cloudControlDeployment)) + return "cloudControlDeployment: string expected"; + return null; + }; + + /** + * Creates a CloudControlDeploymentReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference + */ + CloudControlDeploymentReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference(); + if (object.cloudControlDeployment != null) + message.cloudControlDeployment = String(object.cloudControlDeployment); + return message; + }; + + /** + * Creates a plain object from a CloudControlDeploymentReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} message CloudControlDeploymentReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlDeploymentReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cloudControlDeployment = ""; + if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) + object.cloudControlDeployment = message.cloudControlDeployment; + return object; + }; + + /** + * Converts this CloudControlDeploymentReference to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @instance + * @returns {Object.} JSON object + */ + CloudControlDeploymentReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlDeploymentReference + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlDeploymentReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference"; + }; + + return CloudControlDeploymentReference; + })(); + + v1.FrameworkDeploymentReference = (function() { + + /** + * Properties of a FrameworkDeploymentReference. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFrameworkDeploymentReference + * @property {string|null} [frameworkDeployment] FrameworkDeploymentReference frameworkDeployment + * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null} [frameworkReference] FrameworkDeploymentReference frameworkReference + * @property {string|null} [frameworkDisplayName] FrameworkDeploymentReference frameworkDisplayName + */ + + /** + * Constructs a new FrameworkDeploymentReference. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FrameworkDeploymentReference. + * @implements IFrameworkDeploymentReference + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference=} [properties] Properties to set + */ + function FrameworkDeploymentReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FrameworkDeploymentReference frameworkDeployment. + * @member {string} frameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @instance + */ + FrameworkDeploymentReference.prototype.frameworkDeployment = ""; + + /** + * FrameworkDeploymentReference frameworkReference. + * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null|undefined} frameworkReference + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @instance + */ + FrameworkDeploymentReference.prototype.frameworkReference = null; + + /** + * FrameworkDeploymentReference frameworkDisplayName. + * @member {string} frameworkDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @instance + */ + FrameworkDeploymentReference.prototype.frameworkDisplayName = ""; + + /** + * Creates a new FrameworkDeploymentReference instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference instance + */ + FrameworkDeploymentReference.create = function create(properties) { + return new FrameworkDeploymentReference(properties); + }; + + /** + * Encodes the specified FrameworkDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference} message FrameworkDeploymentReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkDeploymentReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frameworkDeployment != null && Object.hasOwnProperty.call(message, "frameworkDeployment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.frameworkDeployment); + if (message.frameworkReference != null && Object.hasOwnProperty.call(message, "frameworkReference")) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.encode(message.frameworkReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.frameworkDisplayName != null && Object.hasOwnProperty.call(message, "frameworkDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.frameworkDisplayName); + return writer; + }; + + /** + * Encodes the specified FrameworkDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference} message FrameworkDeploymentReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkDeploymentReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrameworkDeploymentReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkDeploymentReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.frameworkDeployment = reader.string(); + break; + } + case 2: { + message.frameworkReference = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.decode(reader, reader.uint32()); + break; + } + case 3: { + message.frameworkDisplayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrameworkDeploymentReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkDeploymentReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrameworkDeploymentReference message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrameworkDeploymentReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) + if (!$util.isString(message.frameworkDeployment)) + return "frameworkDeployment: string expected"; + if (message.frameworkReference != null && message.hasOwnProperty("frameworkReference")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify(message.frameworkReference); + if (error) + return "frameworkReference." + error; + } + if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) + if (!$util.isString(message.frameworkDisplayName)) + return "frameworkDisplayName: string expected"; + return null; + }; + + /** + * Creates a FrameworkDeploymentReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference + */ + FrameworkDeploymentReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference(); + if (object.frameworkDeployment != null) + message.frameworkDeployment = String(object.frameworkDeployment); + if (object.frameworkReference != null) { + if (typeof object.frameworkReference !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.frameworkReference: object expected"); + message.frameworkReference = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.fromObject(object.frameworkReference); + } + if (object.frameworkDisplayName != null) + message.frameworkDisplayName = String(object.frameworkDisplayName); + return message; + }; + + /** + * Creates a plain object from a FrameworkDeploymentReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} message FrameworkDeploymentReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrameworkDeploymentReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.frameworkDeployment = ""; + object.frameworkReference = null; + object.frameworkDisplayName = ""; + } + if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) + object.frameworkDeployment = message.frameworkDeployment; + if (message.frameworkReference != null && message.hasOwnProperty("frameworkReference")) + object.frameworkReference = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.toObject(message.frameworkReference, options); + if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) + object.frameworkDisplayName = message.frameworkDisplayName; + return object; + }; + + /** + * Converts this FrameworkDeploymentReference to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @instance + * @returns {Object.} JSON object + */ + FrameworkDeploymentReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrameworkDeploymentReference + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrameworkDeploymentReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference"; + }; + + return FrameworkDeploymentReference; + })(); + + v1.Monitoring = (function() { + + /** + * Constructs a new Monitoring service. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Monitoring + * @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 Monitoring(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Monitoring.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Monitoring; + + /** + * Creates new Monitoring service using the specified rpc implementation. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @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 {Monitoring} RPC service. Useful where requests and/or responses are streamed. + */ + Monitoring.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFrameworkComplianceSummaries}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @typedef ListFrameworkComplianceSummariesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} [response] ListFrameworkComplianceSummariesResponse + */ + + /** + * Calls ListFrameworkComplianceSummaries. + * @function listFrameworkComplianceSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} request ListFrameworkComplianceSummariesRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummariesCallback} callback Node-style callback called with the error, if any, and ListFrameworkComplianceSummariesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Monitoring.prototype.listFrameworkComplianceSummaries = function listFrameworkComplianceSummaries(request, callback) { + return this.rpcCall(listFrameworkComplianceSummaries, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse, request, callback); + }, "name", { value: "ListFrameworkComplianceSummaries" }); + + /** + * Calls ListFrameworkComplianceSummaries. + * @function listFrameworkComplianceSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} request ListFrameworkComplianceSummariesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFindingSummaries}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @typedef ListFindingSummariesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} [response] ListFindingSummariesResponse + */ + + /** + * Calls ListFindingSummaries. + * @function listFindingSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} request ListFindingSummariesRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummariesCallback} callback Node-style callback called with the error, if any, and ListFindingSummariesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Monitoring.prototype.listFindingSummaries = function listFindingSummaries(request, callback) { + return this.rpcCall(listFindingSummaries, $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse, request, callback); + }, "name", { value: "ListFindingSummaries" }); + + /** + * Calls ListFindingSummaries. + * @function listFindingSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} request ListFindingSummariesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|fetchFrameworkComplianceReport}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @typedef FetchFrameworkComplianceReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} [response] FrameworkComplianceReport + */ + + /** + * Calls FetchFrameworkComplianceReport. + * @function fetchFrameworkComplianceReport + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} request FetchFrameworkComplianceReportRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReportCallback} callback Node-style callback called with the error, if any, and FrameworkComplianceReport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Monitoring.prototype.fetchFrameworkComplianceReport = function fetchFrameworkComplianceReport(request, callback) { + return this.rpcCall(fetchFrameworkComplianceReport, $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest, $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport, request, callback); + }, "name", { value: "FetchFrameworkComplianceReport" }); + + /** + * Calls FetchFrameworkComplianceReport. + * @function fetchFrameworkComplianceReport + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} request FetchFrameworkComplianceReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listControlComplianceSummaries}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @typedef ListControlComplianceSummariesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} [response] ListControlComplianceSummariesResponse + */ + + /** + * Calls ListControlComplianceSummaries. + * @function listControlComplianceSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} request ListControlComplianceSummariesRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummariesCallback} callback Node-style callback called with the error, if any, and ListControlComplianceSummariesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Monitoring.prototype.listControlComplianceSummaries = function listControlComplianceSummaries(request, callback) { + return this.rpcCall(listControlComplianceSummaries, $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse, request, callback); + }, "name", { value: "ListControlComplianceSummaries" }); + + /** + * Calls ListControlComplianceSummaries. + * @function listControlComplianceSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} request ListControlComplianceSummariesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|aggregateFrameworkComplianceReport}. + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @typedef AggregateFrameworkComplianceReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} [response] AggregateFrameworkComplianceReportResponse + */ + + /** + * Calls AggregateFrameworkComplianceReport. + * @function aggregateFrameworkComplianceReport + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} request AggregateFrameworkComplianceReportRequest message or plain object + * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReportCallback} callback Node-style callback called with the error, if any, and AggregateFrameworkComplianceReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Monitoring.prototype.aggregateFrameworkComplianceReport = function aggregateFrameworkComplianceReport(request, callback) { + return this.rpcCall(aggregateFrameworkComplianceReport, $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest, $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse, request, callback); + }, "name", { value: "AggregateFrameworkComplianceReport" }); + + /** + * Calls AggregateFrameworkComplianceReport. + * @function aggregateFrameworkComplianceReport + * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring + * @instance + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} request AggregateFrameworkComplianceReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Monitoring; + })(); + + /** + * EvaluationState enum. + * @name google.cloud.cloudsecuritycompliance.v1.EvaluationState + * @enum {number} + * @property {number} EVALUATION_STATE_UNSPECIFIED=0 EVALUATION_STATE_UNSPECIFIED value + * @property {number} EVALUATION_STATE_PASSED=1 EVALUATION_STATE_PASSED value + * @property {number} EVALUATION_STATE_FAILED=2 EVALUATION_STATE_FAILED value + * @property {number} EVALUATION_STATE_NOT_ASSESSED=3 EVALUATION_STATE_NOT_ASSESSED value + */ + v1.EvaluationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVALUATION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVALUATION_STATE_PASSED"] = 1; + values[valuesById[2] = "EVALUATION_STATE_FAILED"] = 2; + values[valuesById[3] = "EVALUATION_STATE_NOT_ASSESSED"] = 3; + return values; + })(); + + /** + * FindingClass enum. + * @name google.cloud.cloudsecuritycompliance.v1.FindingClass + * @enum {number} + * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value + * @property {number} THREAT=1 THREAT value + * @property {number} VULNERABILITY=2 VULNERABILITY value + * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value + * @property {number} OBSERVATION=4 OBSERVATION value + * @property {number} SCC_ERROR=5 SCC_ERROR value + * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value + * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value + * @property {number} SENSITIVE_DATA_RISK=8 SENSITIVE_DATA_RISK value + * @property {number} CHOKEPOINT=9 CHOKEPOINT value + */ + v1.FindingClass = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; + values[valuesById[1] = "THREAT"] = 1; + values[valuesById[2] = "VULNERABILITY"] = 2; + values[valuesById[3] = "MISCONFIGURATION"] = 3; + values[valuesById[4] = "OBSERVATION"] = 4; + values[valuesById[5] = "SCC_ERROR"] = 5; + values[valuesById[6] = "POSTURE_VIOLATION"] = 6; + values[valuesById[7] = "TOXIC_COMBINATION"] = 7; + values[valuesById[8] = "SENSITIVE_DATA_RISK"] = 8; + values[valuesById[9] = "CHOKEPOINT"] = 9; + return values; + })(); + + /** + * FrameworkComplianceSummaryView enum. + * @name google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView + * @enum {number} + * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED=0 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED value + * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC=1 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC value + * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL=2 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL value + */ + v1.FrameworkComplianceSummaryView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC"] = 1; + values[valuesById[2] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL"] = 2; + return values; + })(); + + v1.ListFrameworkComplianceSummariesRequest = (function() { + + /** + * Properties of a ListFrameworkComplianceSummariesRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworkComplianceSummariesRequest + * @property {string|null} [parent] ListFrameworkComplianceSummariesRequest parent + * @property {number|null} [pageSize] ListFrameworkComplianceSummariesRequest pageSize + * @property {string|null} [pageToken] ListFrameworkComplianceSummariesRequest pageToken + * @property {string|null} [filter] ListFrameworkComplianceSummariesRequest filter + * @property {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|null} [view] ListFrameworkComplianceSummariesRequest view + */ + + /** + * Constructs a new ListFrameworkComplianceSummariesRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworkComplianceSummariesRequest. + * @implements IListFrameworkComplianceSummariesRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest=} [properties] Properties to set + */ + function ListFrameworkComplianceSummariesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworkComplianceSummariesRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @instance + */ + ListFrameworkComplianceSummariesRequest.prototype.parent = ""; + + /** + * ListFrameworkComplianceSummariesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @instance + */ + ListFrameworkComplianceSummariesRequest.prototype.pageSize = 0; + + /** + * ListFrameworkComplianceSummariesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @instance + */ + ListFrameworkComplianceSummariesRequest.prototype.pageToken = ""; + + /** + * ListFrameworkComplianceSummariesRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @instance + */ + ListFrameworkComplianceSummariesRequest.prototype.filter = ""; + + /** + * ListFrameworkComplianceSummariesRequest view. + * @member {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} view + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @instance + */ + ListFrameworkComplianceSummariesRequest.prototype.view = 0; + + /** + * Creates a new ListFrameworkComplianceSummariesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest instance + */ + ListFrameworkComplianceSummariesRequest.create = function create(properties) { + return new ListFrameworkComplianceSummariesRequest(properties); + }; + + /** + * Encodes the specified ListFrameworkComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} message ListFrameworkComplianceSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkComplianceSummariesRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListFrameworkComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} message ListFrameworkComplianceSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkComplianceSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkComplianceSummariesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkComplianceSummariesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworkComplianceSummariesRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworkComplianceSummariesRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListFrameworkComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest + */ + ListFrameworkComplianceSummariesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListFrameworkComplianceSummariesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} message ListFrameworkComplianceSummariesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworkComplianceSummariesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.view = options.enums === String ? "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED" : 0; + } + 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.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView[message.view] === undefined ? message.view : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListFrameworkComplianceSummariesRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @instance + * @returns {Object.} JSON object + */ + ListFrameworkComplianceSummariesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworkComplianceSummariesRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworkComplianceSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest"; + }; + + return ListFrameworkComplianceSummariesRequest; + })(); + + v1.ListFrameworkComplianceSummariesResponse = (function() { + + /** + * Properties of a ListFrameworkComplianceSummariesResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFrameworkComplianceSummariesResponse + * @property {Array.|null} [frameworkComplianceSummaries] ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries + * @property {string|null} [nextPageToken] ListFrameworkComplianceSummariesResponse nextPageToken + */ + + /** + * Constructs a new ListFrameworkComplianceSummariesResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFrameworkComplianceSummariesResponse. + * @implements IListFrameworkComplianceSummariesResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse=} [properties] Properties to set + */ + function ListFrameworkComplianceSummariesResponse(properties) { + this.frameworkComplianceSummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries. + * @member {Array.} frameworkComplianceSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @instance + */ + ListFrameworkComplianceSummariesResponse.prototype.frameworkComplianceSummaries = $util.emptyArray; + + /** + * ListFrameworkComplianceSummariesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @instance + */ + ListFrameworkComplianceSummariesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFrameworkComplianceSummariesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse instance + */ + ListFrameworkComplianceSummariesResponse.create = function create(properties) { + return new ListFrameworkComplianceSummariesResponse(properties); + }; + + /** + * Encodes the specified ListFrameworkComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse} message ListFrameworkComplianceSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkComplianceSummariesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frameworkComplianceSummaries != null && message.frameworkComplianceSummaries.length) + for (var i = 0; i < message.frameworkComplianceSummaries.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.encode(message.frameworkComplianceSummaries[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 ListFrameworkComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse} message ListFrameworkComplianceSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFrameworkComplianceSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkComplianceSummariesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.frameworkComplianceSummaries && message.frameworkComplianceSummaries.length)) + message.frameworkComplianceSummaries = []; + message.frameworkComplianceSummaries.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFrameworkComplianceSummariesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFrameworkComplianceSummariesResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFrameworkComplianceSummariesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frameworkComplianceSummaries != null && message.hasOwnProperty("frameworkComplianceSummaries")) { + if (!Array.isArray(message.frameworkComplianceSummaries)) + return "frameworkComplianceSummaries: array expected"; + for (var i = 0; i < message.frameworkComplianceSummaries.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify(message.frameworkComplianceSummaries[i]); + if (error) + return "frameworkComplianceSummaries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFrameworkComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse + */ + ListFrameworkComplianceSummariesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse(); + if (object.frameworkComplianceSummaries) { + if (!Array.isArray(object.frameworkComplianceSummaries)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.frameworkComplianceSummaries: array expected"); + message.frameworkComplianceSummaries = []; + for (var i = 0; i < object.frameworkComplianceSummaries.length; ++i) { + if (typeof object.frameworkComplianceSummaries[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.frameworkComplianceSummaries: object expected"); + message.frameworkComplianceSummaries[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.fromObject(object.frameworkComplianceSummaries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFrameworkComplianceSummariesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} message ListFrameworkComplianceSummariesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFrameworkComplianceSummariesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.frameworkComplianceSummaries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.frameworkComplianceSummaries && message.frameworkComplianceSummaries.length) { + object.frameworkComplianceSummaries = []; + for (var j = 0; j < message.frameworkComplianceSummaries.length; ++j) + object.frameworkComplianceSummaries[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.toObject(message.frameworkComplianceSummaries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFrameworkComplianceSummariesResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @instance + * @returns {Object.} JSON object + */ + ListFrameworkComplianceSummariesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFrameworkComplianceSummariesResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFrameworkComplianceSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse"; + }; + + return ListFrameworkComplianceSummariesResponse; + })(); + + v1.FrameworkComplianceReport = (function() { + + /** + * Properties of a FrameworkComplianceReport. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFrameworkComplianceReport + * @property {string|null} [framework] FrameworkComplianceReport framework + * @property {string|null} [frameworkDescription] FrameworkComplianceReport frameworkDescription + * @property {google.protobuf.ITimestamp|null} [updateTime] FrameworkComplianceReport updateTime + * @property {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null} [controlAssessmentDetails] FrameworkComplianceReport controlAssessmentDetails + * @property {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null} [frameworkType] FrameworkComplianceReport frameworkType + * @property {Array.|null} [supportedCloudProviders] FrameworkComplianceReport supportedCloudProviders + * @property {Array.|null} [frameworkCategories] FrameworkComplianceReport frameworkCategories + * @property {string|null} [frameworkDisplayName] FrameworkComplianceReport frameworkDisplayName + * @property {string|null} [name] FrameworkComplianceReport name + * @property {number|Long|null} [majorRevisionId] FrameworkComplianceReport majorRevisionId + * @property {number|Long|null} [minorRevisionId] FrameworkComplianceReport minorRevisionId + * @property {Array.|null} [targetResourceDetails] FrameworkComplianceReport targetResourceDetails + */ + + /** + * Constructs a new FrameworkComplianceReport. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FrameworkComplianceReport. + * @implements IFrameworkComplianceReport + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport=} [properties] Properties to set + */ + function FrameworkComplianceReport(properties) { + this.supportedCloudProviders = []; + this.frameworkCategories = []; + this.targetResourceDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FrameworkComplianceReport framework. + * @member {string} framework + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.framework = ""; + + /** + * FrameworkComplianceReport frameworkDescription. + * @member {string} frameworkDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.frameworkDescription = ""; + + /** + * FrameworkComplianceReport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.updateTime = null; + + /** + * FrameworkComplianceReport controlAssessmentDetails. + * @member {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null|undefined} controlAssessmentDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.controlAssessmentDetails = null; + + /** + * FrameworkComplianceReport frameworkType. + * @member {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType} frameworkType + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.frameworkType = 0; + + /** + * FrameworkComplianceReport supportedCloudProviders. + * @member {Array.} supportedCloudProviders + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.supportedCloudProviders = $util.emptyArray; + + /** + * FrameworkComplianceReport frameworkCategories. + * @member {Array.} frameworkCategories + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.frameworkCategories = $util.emptyArray; + + /** + * FrameworkComplianceReport frameworkDisplayName. + * @member {string} frameworkDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.frameworkDisplayName = ""; + + /** + * FrameworkComplianceReport name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.name = ""; + + /** + * FrameworkComplianceReport majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FrameworkComplianceReport minorRevisionId. + * @member {number|Long} minorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FrameworkComplianceReport targetResourceDetails. + * @member {Array.} targetResourceDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + */ + FrameworkComplianceReport.prototype.targetResourceDetails = $util.emptyArray; + + /** + * Creates a new FrameworkComplianceReport instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport instance + */ + FrameworkComplianceReport.create = function create(properties) { + return new FrameworkComplianceReport(properties); + }; + + /** + * Encodes the specified FrameworkComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport} message FrameworkComplianceReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkComplianceReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); + if (message.frameworkDescription != null && Object.hasOwnProperty.call(message, "frameworkDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkDescription); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.controlAssessmentDetails != null && Object.hasOwnProperty.call(message, "controlAssessmentDetails")) + $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.encode(message.controlAssessmentDetails, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.frameworkType != null && Object.hasOwnProperty.call(message, "frameworkType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frameworkType); + if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + writer.int32(message.supportedCloudProviders[i]); + writer.ldelim(); + } + if (message.frameworkCategories != null && message.frameworkCategories.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.frameworkCategories.length; ++i) + writer.int32(message.frameworkCategories[i]); + writer.ldelim(); + } + if (message.frameworkDisplayName != null && Object.hasOwnProperty.call(message, "frameworkDisplayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.frameworkDisplayName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.name); + if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.majorRevisionId); + if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.minorRevisionId); + if (message.targetResourceDetails != null && message.targetResourceDetails.length) + for (var i = 0; i < message.targetResourceDetails.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.encode(message.targetResourceDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FrameworkComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport} message FrameworkComplianceReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkComplianceReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrameworkComplianceReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkComplianceReport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.framework = reader.string(); + break; + } + case 2: { + message.frameworkDescription = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.decode(reader, reader.uint32()); + break; + } + case 5: { + message.frameworkType = reader.int32(); + break; + } + case 6: { + if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) + message.supportedCloudProviders = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedCloudProviders.push(reader.int32()); + } else + message.supportedCloudProviders.push(reader.int32()); + break; + } + case 7: { + if (!(message.frameworkCategories && message.frameworkCategories.length)) + message.frameworkCategories = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.frameworkCategories.push(reader.int32()); + } else + message.frameworkCategories.push(reader.int32()); + break; + } + case 8: { + message.frameworkDisplayName = reader.string(); + break; + } + case 9: { + message.name = reader.string(); + break; + } + case 10: { + message.majorRevisionId = reader.int64(); + break; + } + case 11: { + message.minorRevisionId = reader.int64(); + break; + } + case 12: { + if (!(message.targetResourceDetails && message.targetResourceDetails.length)) + message.targetResourceDetails = []; + message.targetResourceDetails.push($root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrameworkComplianceReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkComplianceReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrameworkComplianceReport message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrameworkComplianceReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.framework != null && message.hasOwnProperty("framework")) + if (!$util.isString(message.framework)) + return "framework: string expected"; + if (message.frameworkDescription != null && message.hasOwnProperty("frameworkDescription")) + if (!$util.isString(message.frameworkDescription)) + return "frameworkDescription: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify(message.controlAssessmentDetails); + if (error) + return "controlAssessmentDetails." + error; + } + if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) + switch (message.frameworkType) { + default: + return "frameworkType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { + if (!Array.isArray(message.supportedCloudProviders)) + return "supportedCloudProviders: array expected"; + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + switch (message.supportedCloudProviders[i]) { + default: + return "supportedCloudProviders: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.frameworkCategories != null && message.hasOwnProperty("frameworkCategories")) { + if (!Array.isArray(message.frameworkCategories)) + return "frameworkCategories: array expected"; + for (var i = 0; i < message.frameworkCategories.length; ++i) + switch (message.frameworkCategories[i]) { + default: + return "frameworkCategories: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) + if (!$util.isString(message.frameworkDisplayName)) + return "frameworkDisplayName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) + return "minorRevisionId: integer|Long expected"; + if (message.targetResourceDetails != null && message.hasOwnProperty("targetResourceDetails")) { + if (!Array.isArray(message.targetResourceDetails)) + return "targetResourceDetails: array expected"; + for (var i = 0; i < message.targetResourceDetails.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify(message.targetResourceDetails[i]); + if (error) + return "targetResourceDetails." + error; + } + } + return null; + }; + + /** + * Creates a FrameworkComplianceReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport + */ + FrameworkComplianceReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport(); + if (object.framework != null) + message.framework = String(object.framework); + if (object.frameworkDescription != null) + message.frameworkDescription = String(object.frameworkDescription); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.controlAssessmentDetails != null) { + if (typeof object.controlAssessmentDetails !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.controlAssessmentDetails: object expected"); + message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.fromObject(object.controlAssessmentDetails); + } + switch (object.frameworkType) { + default: + if (typeof object.frameworkType === "number") { + message.frameworkType = object.frameworkType; + break; + } + break; + case "FRAMEWORK_TYPE_UNSPECIFIED": + case 0: + message.frameworkType = 0; + break; + case "BUILT_IN": + case 1: + message.frameworkType = 1; + break; + case "CUSTOM": + case 2: + message.frameworkType = 2; + break; + } + if (object.supportedCloudProviders) { + if (!Array.isArray(object.supportedCloudProviders)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.supportedCloudProviders: array expected"); + message.supportedCloudProviders = []; + for (var i = 0; i < object.supportedCloudProviders.length; ++i) + switch (object.supportedCloudProviders[i]) { + default: + if (typeof object.supportedCloudProviders[i] === "number") { + message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; + break; + } + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.supportedCloudProviders[i] = 0; + break; + case "AWS": + case 1: + message.supportedCloudProviders[i] = 1; + break; + case "AZURE": + case 2: + message.supportedCloudProviders[i] = 2; + break; + case "GCP": + case 3: + message.supportedCloudProviders[i] = 3; + break; + } + } + if (object.frameworkCategories) { + if (!Array.isArray(object.frameworkCategories)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.frameworkCategories: array expected"); + message.frameworkCategories = []; + for (var i = 0; i < object.frameworkCategories.length; ++i) + switch (object.frameworkCategories[i]) { + default: + if (typeof object.frameworkCategories[i] === "number") { + message.frameworkCategories[i] = object.frameworkCategories[i]; + break; + } + case "FRAMEWORK_CATEGORY_UNSPECIFIED": + case 0: + message.frameworkCategories[i] = 0; + break; + case "INDUSTRY_DEFINED_STANDARD": + case 1: + message.frameworkCategories[i] = 1; + break; + case "ASSURED_WORKLOADS": + case 2: + message.frameworkCategories[i] = 2; + break; + case "DATA_SECURITY": + case 3: + message.frameworkCategories[i] = 3; + break; + case "GOOGLE_BEST_PRACTICES": + case 4: + message.frameworkCategories[i] = 4; + break; + case "CUSTOM_FRAMEWORK": + case 5: + message.frameworkCategories[i] = 5; + break; + } + } + if (object.frameworkDisplayName != null) + message.frameworkDisplayName = String(object.frameworkDisplayName); + if (object.name != null) + message.name = String(object.name); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + if (object.minorRevisionId != null) + if ($util.Long) + (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; + else if (typeof object.minorRevisionId === "string") + message.minorRevisionId = parseInt(object.minorRevisionId, 10); + else if (typeof object.minorRevisionId === "number") + message.minorRevisionId = object.minorRevisionId; + else if (typeof object.minorRevisionId === "object") + message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); + if (object.targetResourceDetails) { + if (!Array.isArray(object.targetResourceDetails)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.targetResourceDetails: array expected"); + message.targetResourceDetails = []; + for (var i = 0; i < object.targetResourceDetails.length; ++i) { + if (typeof object.targetResourceDetails[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.targetResourceDetails: object expected"); + message.targetResourceDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.fromObject(object.targetResourceDetails[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FrameworkComplianceReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} message FrameworkComplianceReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrameworkComplianceReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.supportedCloudProviders = []; + object.frameworkCategories = []; + object.targetResourceDetails = []; + } + if (options.defaults) { + object.framework = ""; + object.frameworkDescription = ""; + object.updateTime = null; + object.controlAssessmentDetails = null; + object.frameworkType = options.enums === String ? "FRAMEWORK_TYPE_UNSPECIFIED" : 0; + object.frameworkDisplayName = ""; + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minorRevisionId = options.longs === String ? "0" : 0; + } + if (message.framework != null && message.hasOwnProperty("framework")) + object.framework = message.framework; + if (message.frameworkDescription != null && message.hasOwnProperty("frameworkDescription")) + object.frameworkDescription = message.frameworkDescription; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) + object.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.toObject(message.controlAssessmentDetails, options); + if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) + object.frameworkType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] === undefined ? message.frameworkType : $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] : message.frameworkType; + if (message.supportedCloudProviders && message.supportedCloudProviders.length) { + object.supportedCloudProviders = []; + for (var j = 0; j < message.supportedCloudProviders.length; ++j) + object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; + } + if (message.frameworkCategories && message.frameworkCategories.length) { + object.frameworkCategories = []; + for (var j = 0; j < message.frameworkCategories.length; ++j) + object.frameworkCategories[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] === undefined ? message.frameworkCategories[j] : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] : message.frameworkCategories[j]; + } + if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) + object.frameworkDisplayName = message.frameworkDisplayName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (typeof message.minorRevisionId === "number") + object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; + else + object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; + if (message.targetResourceDetails && message.targetResourceDetails.length) { + object.targetResourceDetails = []; + for (var j = 0; j < message.targetResourceDetails.length; ++j) + object.targetResourceDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.toObject(message.targetResourceDetails[j], options); + } + return object; + }; + + /** + * Converts this FrameworkComplianceReport to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @instance + * @returns {Object.} JSON object + */ + FrameworkComplianceReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrameworkComplianceReport + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrameworkComplianceReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport"; + }; + + return FrameworkComplianceReport; + })(); + + v1.FetchFrameworkComplianceReportRequest = (function() { + + /** + * Properties of a FetchFrameworkComplianceReportRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFetchFrameworkComplianceReportRequest + * @property {string|null} [name] FetchFrameworkComplianceReportRequest name + * @property {google.protobuf.ITimestamp|null} [endTime] FetchFrameworkComplianceReportRequest endTime + * @property {string|null} [filter] FetchFrameworkComplianceReportRequest filter + */ + + /** + * Constructs a new FetchFrameworkComplianceReportRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FetchFrameworkComplianceReportRequest. + * @implements IFetchFrameworkComplianceReportRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest=} [properties] Properties to set + */ + function FetchFrameworkComplianceReportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchFrameworkComplianceReportRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @instance + */ + FetchFrameworkComplianceReportRequest.prototype.name = ""; + + /** + * FetchFrameworkComplianceReportRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @instance + */ + FetchFrameworkComplianceReportRequest.prototype.endTime = null; + + /** + * FetchFrameworkComplianceReportRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @instance + */ + FetchFrameworkComplianceReportRequest.prototype.filter = ""; + + /** + * Creates a new FetchFrameworkComplianceReportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest instance + */ + FetchFrameworkComplianceReportRequest.create = function create(properties) { + return new FetchFrameworkComplianceReportRequest(properties); + }; + + /** + * Encodes the specified FetchFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} message FetchFrameworkComplianceReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFrameworkComplianceReportRequest.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.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + return writer; + }; + + /** + * Encodes the specified FetchFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} message FetchFrameworkComplianceReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchFrameworkComplianceReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFrameworkComplianceReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchFrameworkComplianceReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchFrameworkComplianceReportRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchFrameworkComplianceReportRequest.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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a FetchFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest + */ + FetchFrameworkComplianceReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a FetchFrameworkComplianceReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} message FetchFrameworkComplianceReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchFrameworkComplianceReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.endTime = null; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this FetchFrameworkComplianceReportRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @instance + * @returns {Object.} JSON object + */ + FetchFrameworkComplianceReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchFrameworkComplianceReportRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchFrameworkComplianceReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest"; + }; + + return FetchFrameworkComplianceReportRequest; + })(); + + v1.ListFindingSummariesRequest = (function() { + + /** + * Properties of a ListFindingSummariesRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFindingSummariesRequest + * @property {string|null} [parent] ListFindingSummariesRequest parent + * @property {number|null} [pageSize] ListFindingSummariesRequest pageSize + * @property {string|null} [pageToken] ListFindingSummariesRequest pageToken + * @property {string|null} [filter] ListFindingSummariesRequest filter + * @property {google.protobuf.ITimestamp|null} [endTime] ListFindingSummariesRequest endTime + */ + + /** + * Constructs a new ListFindingSummariesRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFindingSummariesRequest. + * @implements IListFindingSummariesRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest=} [properties] Properties to set + */ + function ListFindingSummariesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFindingSummariesRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @instance + */ + ListFindingSummariesRequest.prototype.parent = ""; + + /** + * ListFindingSummariesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @instance + */ + ListFindingSummariesRequest.prototype.pageSize = 0; + + /** + * ListFindingSummariesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @instance + */ + ListFindingSummariesRequest.prototype.pageToken = ""; + + /** + * ListFindingSummariesRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @instance + */ + ListFindingSummariesRequest.prototype.filter = ""; + + /** + * ListFindingSummariesRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @instance + */ + ListFindingSummariesRequest.prototype.endTime = null; + + /** + * Creates a new ListFindingSummariesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest instance + */ + ListFindingSummariesRequest.create = function create(properties) { + return new ListFindingSummariesRequest(properties); + }; + + /** + * Encodes the specified ListFindingSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} message ListFindingSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingSummariesRequest.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.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListFindingSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} message ListFindingSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFindingSummariesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingSummariesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFindingSummariesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingSummariesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFindingSummariesRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFindingSummariesRequest.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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a ListFindingSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest + */ + ListFindingSummariesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest(); + 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.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a ListFindingSummariesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} message ListFindingSummariesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFindingSummariesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.endTime = null; + } + 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.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this ListFindingSummariesRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @instance + * @returns {Object.} JSON object + */ + ListFindingSummariesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFindingSummariesRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFindingSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest"; + }; + + return ListFindingSummariesRequest; + })(); + + v1.ListFindingSummariesResponse = (function() { + + /** + * Properties of a ListFindingSummariesResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListFindingSummariesResponse + * @property {Array.|null} [findingSummaries] ListFindingSummariesResponse findingSummaries + * @property {string|null} [nextPageToken] ListFindingSummariesResponse nextPageToken + */ + + /** + * Constructs a new ListFindingSummariesResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListFindingSummariesResponse. + * @implements IListFindingSummariesResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse=} [properties] Properties to set + */ + function ListFindingSummariesResponse(properties) { + this.findingSummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFindingSummariesResponse findingSummaries. + * @member {Array.} findingSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @instance + */ + ListFindingSummariesResponse.prototype.findingSummaries = $util.emptyArray; + + /** + * ListFindingSummariesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @instance + */ + ListFindingSummariesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFindingSummariesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse instance + */ + ListFindingSummariesResponse.create = function create(properties) { + return new ListFindingSummariesResponse(properties); + }; + + /** + * Encodes the specified ListFindingSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse} message ListFindingSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingSummariesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.findingSummaries != null && message.findingSummaries.length) + for (var i = 0; i < message.findingSummaries.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.encode(message.findingSummaries[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 ListFindingSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse} message ListFindingSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFindingSummariesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingSummariesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.findingSummaries && message.findingSummaries.length)) + message.findingSummaries = []; + message.findingSummaries.push($root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFindingSummariesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingSummariesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFindingSummariesResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFindingSummariesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.findingSummaries != null && message.hasOwnProperty("findingSummaries")) { + if (!Array.isArray(message.findingSummaries)) + return "findingSummaries: array expected"; + for (var i = 0; i < message.findingSummaries.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify(message.findingSummaries[i]); + if (error) + return "findingSummaries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFindingSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse + */ + ListFindingSummariesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse(); + if (object.findingSummaries) { + if (!Array.isArray(object.findingSummaries)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.findingSummaries: array expected"); + message.findingSummaries = []; + for (var i = 0; i < object.findingSummaries.length; ++i) { + if (typeof object.findingSummaries[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.findingSummaries: object expected"); + message.findingSummaries[i] = $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.fromObject(object.findingSummaries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFindingSummariesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} message ListFindingSummariesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFindingSummariesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.findingSummaries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.findingSummaries && message.findingSummaries.length) { + object.findingSummaries = []; + for (var j = 0; j < message.findingSummaries.length; ++j) + object.findingSummaries[j] = $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.toObject(message.findingSummaries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFindingSummariesResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @instance + * @returns {Object.} JSON object + */ + ListFindingSummariesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFindingSummariesResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFindingSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse"; + }; + + return ListFindingSummariesResponse; + })(); + + v1.ListControlComplianceSummariesRequest = (function() { + + /** + * Properties of a ListControlComplianceSummariesRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListControlComplianceSummariesRequest + * @property {string|null} [parent] ListControlComplianceSummariesRequest parent + * @property {google.protobuf.ITimestamp|null} [endTime] ListControlComplianceSummariesRequest endTime + * @property {number|null} [pageSize] ListControlComplianceSummariesRequest pageSize + * @property {string|null} [pageToken] ListControlComplianceSummariesRequest pageToken + * @property {string|null} [filter] ListControlComplianceSummariesRequest filter + */ + + /** + * Constructs a new ListControlComplianceSummariesRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListControlComplianceSummariesRequest. + * @implements IListControlComplianceSummariesRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest=} [properties] Properties to set + */ + function ListControlComplianceSummariesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListControlComplianceSummariesRequest parent. + * @member {string} parent + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @instance + */ + ListControlComplianceSummariesRequest.prototype.parent = ""; + + /** + * ListControlComplianceSummariesRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @instance + */ + ListControlComplianceSummariesRequest.prototype.endTime = null; + + /** + * ListControlComplianceSummariesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @instance + */ + ListControlComplianceSummariesRequest.prototype.pageSize = 0; + + /** + * ListControlComplianceSummariesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @instance + */ + ListControlComplianceSummariesRequest.prototype.pageToken = ""; + + /** + * ListControlComplianceSummariesRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @instance + */ + ListControlComplianceSummariesRequest.prototype.filter = ""; + + /** + * Creates a new ListControlComplianceSummariesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest instance + */ + ListControlComplianceSummariesRequest.create = function create(properties) { + return new ListControlComplianceSummariesRequest(properties); + }; + + /** + * Encodes the specified ListControlComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} message ListControlComplianceSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListControlComplianceSummariesRequest.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.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListControlComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} message ListControlComplianceSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListControlComplianceSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListControlComplianceSummariesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListControlComplianceSummariesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListControlComplianceSummariesRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListControlComplianceSummariesRequest.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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListControlComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest + */ + ListControlComplianceSummariesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListControlComplianceSummariesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} message ListControlComplianceSummariesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListControlComplianceSummariesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.endTime = null; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListControlComplianceSummariesRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @instance + * @returns {Object.} JSON object + */ + ListControlComplianceSummariesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListControlComplianceSummariesRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListControlComplianceSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest"; + }; + + return ListControlComplianceSummariesRequest; + })(); + + v1.ListControlComplianceSummariesResponse = (function() { + + /** + * Properties of a ListControlComplianceSummariesResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IListControlComplianceSummariesResponse + * @property {Array.|null} [controlComplianceSummaries] ListControlComplianceSummariesResponse controlComplianceSummaries + * @property {string|null} [nextPageToken] ListControlComplianceSummariesResponse nextPageToken + */ + + /** + * Constructs a new ListControlComplianceSummariesResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ListControlComplianceSummariesResponse. + * @implements IListControlComplianceSummariesResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse=} [properties] Properties to set + */ + function ListControlComplianceSummariesResponse(properties) { + this.controlComplianceSummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListControlComplianceSummariesResponse controlComplianceSummaries. + * @member {Array.} controlComplianceSummaries + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @instance + */ + ListControlComplianceSummariesResponse.prototype.controlComplianceSummaries = $util.emptyArray; + + /** + * ListControlComplianceSummariesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @instance + */ + ListControlComplianceSummariesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListControlComplianceSummariesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse instance + */ + ListControlComplianceSummariesResponse.create = function create(properties) { + return new ListControlComplianceSummariesResponse(properties); + }; + + /** + * Encodes the specified ListControlComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse} message ListControlComplianceSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListControlComplianceSummariesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.controlComplianceSummaries != null && message.controlComplianceSummaries.length) + for (var i = 0; i < message.controlComplianceSummaries.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.encode(message.controlComplianceSummaries[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 ListControlComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse} message ListControlComplianceSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListControlComplianceSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListControlComplianceSummariesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.controlComplianceSummaries && message.controlComplianceSummaries.length)) + message.controlComplianceSummaries = []; + message.controlComplianceSummaries.push($root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListControlComplianceSummariesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListControlComplianceSummariesResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListControlComplianceSummariesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.controlComplianceSummaries != null && message.hasOwnProperty("controlComplianceSummaries")) { + if (!Array.isArray(message.controlComplianceSummaries)) + return "controlComplianceSummaries: array expected"; + for (var i = 0; i < message.controlComplianceSummaries.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify(message.controlComplianceSummaries[i]); + if (error) + return "controlComplianceSummaries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListControlComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse + */ + ListControlComplianceSummariesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse(); + if (object.controlComplianceSummaries) { + if (!Array.isArray(object.controlComplianceSummaries)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.controlComplianceSummaries: array expected"); + message.controlComplianceSummaries = []; + for (var i = 0; i < object.controlComplianceSummaries.length; ++i) { + if (typeof object.controlComplianceSummaries[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.controlComplianceSummaries: object expected"); + message.controlComplianceSummaries[i] = $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.fromObject(object.controlComplianceSummaries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListControlComplianceSummariesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} message ListControlComplianceSummariesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListControlComplianceSummariesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.controlComplianceSummaries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.controlComplianceSummaries && message.controlComplianceSummaries.length) { + object.controlComplianceSummaries = []; + for (var j = 0; j < message.controlComplianceSummaries.length; ++j) + object.controlComplianceSummaries[j] = $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.toObject(message.controlComplianceSummaries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListControlComplianceSummariesResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @instance + * @returns {Object.} JSON object + */ + ListControlComplianceSummariesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListControlComplianceSummariesResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListControlComplianceSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse"; + }; + + return ListControlComplianceSummariesResponse; + })(); + + v1.AggregateFrameworkComplianceReportRequest = (function() { + + /** + * Properties of an AggregateFrameworkComplianceReportRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IAggregateFrameworkComplianceReportRequest + * @property {string|null} [name] AggregateFrameworkComplianceReportRequest name + * @property {google.type.IInterval|null} [interval] AggregateFrameworkComplianceReportRequest interval + * @property {string|null} [filter] AggregateFrameworkComplianceReportRequest filter + */ + + /** + * Constructs a new AggregateFrameworkComplianceReportRequest. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an AggregateFrameworkComplianceReportRequest. + * @implements IAggregateFrameworkComplianceReportRequest + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest=} [properties] Properties to set + */ + function AggregateFrameworkComplianceReportRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AggregateFrameworkComplianceReportRequest name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @instance + */ + AggregateFrameworkComplianceReportRequest.prototype.name = ""; + + /** + * AggregateFrameworkComplianceReportRequest interval. + * @member {google.type.IInterval|null|undefined} interval + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @instance + */ + AggregateFrameworkComplianceReportRequest.prototype.interval = null; + + /** + * AggregateFrameworkComplianceReportRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @instance + */ + AggregateFrameworkComplianceReportRequest.prototype.filter = ""; + + /** + * Creates a new AggregateFrameworkComplianceReportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest instance + */ + AggregateFrameworkComplianceReportRequest.create = function create(properties) { + return new AggregateFrameworkComplianceReportRequest(properties); + }; + + /** + * Encodes the specified AggregateFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} message AggregateFrameworkComplianceReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateFrameworkComplianceReportRequest.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.interval != null && Object.hasOwnProperty.call(message, "interval")) + $root.google.type.Interval.encode(message.interval, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + return writer; + }; + + /** + * Encodes the specified AggregateFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} message AggregateFrameworkComplianceReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateFrameworkComplianceReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateFrameworkComplianceReportRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.interval = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateFrameworkComplianceReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AggregateFrameworkComplianceReportRequest message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregateFrameworkComplianceReportRequest.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.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.type.Interval.verify(message.interval); + if (error) + return "interval." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates an AggregateFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest + */ + AggregateFrameworkComplianceReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.interval: object expected"); + message.interval = $root.google.type.Interval.fromObject(object.interval); + } + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from an AggregateFrameworkComplianceReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} message AggregateFrameworkComplianceReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregateFrameworkComplianceReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.interval = null; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.type.Interval.toObject(message.interval, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this AggregateFrameworkComplianceReportRequest to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @instance + * @returns {Object.} JSON object + */ + AggregateFrameworkComplianceReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregateFrameworkComplianceReportRequest + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregateFrameworkComplianceReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest"; + }; + + return AggregateFrameworkComplianceReportRequest; + })(); + + v1.AggregateFrameworkComplianceReportResponse = (function() { + + /** + * Properties of an AggregateFrameworkComplianceReportResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IAggregateFrameworkComplianceReportResponse + * @property {Array.|null} [aggregatedComplianceReports] AggregateFrameworkComplianceReportResponse aggregatedComplianceReports + */ + + /** + * Constructs a new AggregateFrameworkComplianceReportResponse. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an AggregateFrameworkComplianceReportResponse. + * @implements IAggregateFrameworkComplianceReportResponse + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse=} [properties] Properties to set + */ + function AggregateFrameworkComplianceReportResponse(properties) { + this.aggregatedComplianceReports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AggregateFrameworkComplianceReportResponse aggregatedComplianceReports. + * @member {Array.} aggregatedComplianceReports + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @instance + */ + AggregateFrameworkComplianceReportResponse.prototype.aggregatedComplianceReports = $util.emptyArray; + + /** + * Creates a new AggregateFrameworkComplianceReportResponse instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse instance + */ + AggregateFrameworkComplianceReportResponse.create = function create(properties) { + return new AggregateFrameworkComplianceReportResponse(properties); + }; + + /** + * Encodes the specified AggregateFrameworkComplianceReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse} message AggregateFrameworkComplianceReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateFrameworkComplianceReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aggregatedComplianceReports != null && message.aggregatedComplianceReports.length) + for (var i = 0; i < message.aggregatedComplianceReports.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.encode(message.aggregatedComplianceReports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AggregateFrameworkComplianceReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse} message AggregateFrameworkComplianceReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateFrameworkComplianceReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateFrameworkComplianceReportResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.aggregatedComplianceReports && message.aggregatedComplianceReports.length)) + message.aggregatedComplianceReports = []; + message.aggregatedComplianceReports.push($root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateFrameworkComplianceReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AggregateFrameworkComplianceReportResponse message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregateFrameworkComplianceReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.aggregatedComplianceReports != null && message.hasOwnProperty("aggregatedComplianceReports")) { + if (!Array.isArray(message.aggregatedComplianceReports)) + return "aggregatedComplianceReports: array expected"; + for (var i = 0; i < message.aggregatedComplianceReports.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify(message.aggregatedComplianceReports[i]); + if (error) + return "aggregatedComplianceReports." + error; + } + } + return null; + }; + + /** + * Creates an AggregateFrameworkComplianceReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse + */ + AggregateFrameworkComplianceReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse(); + if (object.aggregatedComplianceReports) { + if (!Array.isArray(object.aggregatedComplianceReports)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.aggregatedComplianceReports: array expected"); + message.aggregatedComplianceReports = []; + for (var i = 0; i < object.aggregatedComplianceReports.length; ++i) { + if (typeof object.aggregatedComplianceReports[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.aggregatedComplianceReports: object expected"); + message.aggregatedComplianceReports[i] = $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.fromObject(object.aggregatedComplianceReports[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AggregateFrameworkComplianceReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} message AggregateFrameworkComplianceReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregateFrameworkComplianceReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aggregatedComplianceReports = []; + if (message.aggregatedComplianceReports && message.aggregatedComplianceReports.length) { + object.aggregatedComplianceReports = []; + for (var j = 0; j < message.aggregatedComplianceReports.length; ++j) + object.aggregatedComplianceReports[j] = $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.toObject(message.aggregatedComplianceReports[j], options); + } + return object; + }; + + /** + * Converts this AggregateFrameworkComplianceReportResponse to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @instance + * @returns {Object.} JSON object + */ + AggregateFrameworkComplianceReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregateFrameworkComplianceReportResponse + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregateFrameworkComplianceReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse"; + }; + + return AggregateFrameworkComplianceReportResponse; + })(); + + v1.ControlAssessmentDetails = (function() { + + /** + * Properties of a ControlAssessmentDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IControlAssessmentDetails + * @property {number|null} [passingControls] ControlAssessmentDetails passingControls + * @property {number|null} [failingControls] ControlAssessmentDetails failingControls + * @property {number|null} [assessedPassingControls] ControlAssessmentDetails assessedPassingControls + * @property {number|null} [notAssessedControls] ControlAssessmentDetails notAssessedControls + */ + + /** + * Constructs a new ControlAssessmentDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ControlAssessmentDetails. + * @implements IControlAssessmentDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails=} [properties] Properties to set + */ + function ControlAssessmentDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ControlAssessmentDetails passingControls. + * @member {number} passingControls + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @instance + */ + ControlAssessmentDetails.prototype.passingControls = 0; + + /** + * ControlAssessmentDetails failingControls. + * @member {number} failingControls + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @instance + */ + ControlAssessmentDetails.prototype.failingControls = 0; + + /** + * ControlAssessmentDetails assessedPassingControls. + * @member {number} assessedPassingControls + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @instance + */ + ControlAssessmentDetails.prototype.assessedPassingControls = 0; + + /** + * ControlAssessmentDetails notAssessedControls. + * @member {number} notAssessedControls + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @instance + */ + ControlAssessmentDetails.prototype.notAssessedControls = 0; + + /** + * Creates a new ControlAssessmentDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails instance + */ + ControlAssessmentDetails.create = function create(properties) { + return new ControlAssessmentDetails(properties); + }; + + /** + * Encodes the specified ControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails} message ControlAssessmentDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlAssessmentDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.passingControls != null && Object.hasOwnProperty.call(message, "passingControls")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.passingControls); + if (message.failingControls != null && Object.hasOwnProperty.call(message, "failingControls")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failingControls); + if (message.assessedPassingControls != null && Object.hasOwnProperty.call(message, "assessedPassingControls")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.assessedPassingControls); + if (message.notAssessedControls != null && Object.hasOwnProperty.call(message, "notAssessedControls")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.notAssessedControls); + return writer; + }; + + /** + * Encodes the specified ControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails} message ControlAssessmentDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlAssessmentDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ControlAssessmentDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlAssessmentDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.passingControls = reader.int32(); + break; + } + case 2: { + message.failingControls = reader.int32(); + break; + } + case 3: { + message.assessedPassingControls = reader.int32(); + break; + } + case 4: { + message.notAssessedControls = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ControlAssessmentDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlAssessmentDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ControlAssessmentDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ControlAssessmentDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.passingControls != null && message.hasOwnProperty("passingControls")) + if (!$util.isInteger(message.passingControls)) + return "passingControls: integer expected"; + if (message.failingControls != null && message.hasOwnProperty("failingControls")) + if (!$util.isInteger(message.failingControls)) + return "failingControls: integer expected"; + if (message.assessedPassingControls != null && message.hasOwnProperty("assessedPassingControls")) + if (!$util.isInteger(message.assessedPassingControls)) + return "assessedPassingControls: integer expected"; + if (message.notAssessedControls != null && message.hasOwnProperty("notAssessedControls")) + if (!$util.isInteger(message.notAssessedControls)) + return "notAssessedControls: integer expected"; + return null; + }; + + /** + * Creates a ControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails + */ + ControlAssessmentDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails(); + if (object.passingControls != null) + message.passingControls = object.passingControls | 0; + if (object.failingControls != null) + message.failingControls = object.failingControls | 0; + if (object.assessedPassingControls != null) + message.assessedPassingControls = object.assessedPassingControls | 0; + if (object.notAssessedControls != null) + message.notAssessedControls = object.notAssessedControls | 0; + return message; + }; + + /** + * Creates a plain object from a ControlAssessmentDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} message ControlAssessmentDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ControlAssessmentDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.passingControls = 0; + object.failingControls = 0; + object.assessedPassingControls = 0; + object.notAssessedControls = 0; + } + if (message.passingControls != null && message.hasOwnProperty("passingControls")) + object.passingControls = message.passingControls; + if (message.failingControls != null && message.hasOwnProperty("failingControls")) + object.failingControls = message.failingControls; + if (message.assessedPassingControls != null && message.hasOwnProperty("assessedPassingControls")) + object.assessedPassingControls = message.assessedPassingControls; + if (message.notAssessedControls != null && message.hasOwnProperty("notAssessedControls")) + object.notAssessedControls = message.notAssessedControls; + return object; + }; + + /** + * Converts this ControlAssessmentDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @instance + * @returns {Object.} JSON object + */ + ControlAssessmentDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ControlAssessmentDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ControlAssessmentDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails"; + }; + + return ControlAssessmentDetails; + })(); + + v1.FrameworkComplianceSummary = (function() { + + /** + * Properties of a FrameworkComplianceSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFrameworkComplianceSummary + * @property {string|null} [framework] FrameworkComplianceSummary framework + * @property {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null} [controlAssessmentDetails] FrameworkComplianceSummary controlAssessmentDetails + * @property {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null} [frameworkType] FrameworkComplianceSummary frameworkType + * @property {Array.|null} [supportedCloudProviders] FrameworkComplianceSummary supportedCloudProviders + * @property {Array.|null} [frameworkCategories] FrameworkComplianceSummary frameworkCategories + * @property {string|null} [frameworkDisplayName] FrameworkComplianceSummary frameworkDisplayName + * @property {string|null} [name] FrameworkComplianceSummary name + * @property {number|Long|null} [majorRevisionId] FrameworkComplianceSummary majorRevisionId + * @property {number|Long|null} [minorRevisionId] FrameworkComplianceSummary minorRevisionId + * @property {Array.|null} [targetResourceDetails] FrameworkComplianceSummary targetResourceDetails + * @property {number|Long|null} [findingCount] FrameworkComplianceSummary findingCount + * @property {google.cloud.cloudsecuritycompliance.v1.ITrend|null} [controlsPassingTrend] FrameworkComplianceSummary controlsPassingTrend + */ + + /** + * Constructs a new FrameworkComplianceSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FrameworkComplianceSummary. + * @implements IFrameworkComplianceSummary + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary=} [properties] Properties to set + */ + function FrameworkComplianceSummary(properties) { + this.supportedCloudProviders = []; + this.frameworkCategories = []; + this.targetResourceDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FrameworkComplianceSummary framework. + * @member {string} framework + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.framework = ""; + + /** + * FrameworkComplianceSummary controlAssessmentDetails. + * @member {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null|undefined} controlAssessmentDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.controlAssessmentDetails = null; + + /** + * FrameworkComplianceSummary frameworkType. + * @member {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType} frameworkType + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.frameworkType = 0; + + /** + * FrameworkComplianceSummary supportedCloudProviders. + * @member {Array.} supportedCloudProviders + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.supportedCloudProviders = $util.emptyArray; + + /** + * FrameworkComplianceSummary frameworkCategories. + * @member {Array.} frameworkCategories + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.frameworkCategories = $util.emptyArray; + + /** + * FrameworkComplianceSummary frameworkDisplayName. + * @member {string} frameworkDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.frameworkDisplayName = ""; + + /** + * FrameworkComplianceSummary name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.name = ""; + + /** + * FrameworkComplianceSummary majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FrameworkComplianceSummary minorRevisionId. + * @member {number|Long} minorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FrameworkComplianceSummary targetResourceDetails. + * @member {Array.} targetResourceDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.targetResourceDetails = $util.emptyArray; + + /** + * FrameworkComplianceSummary findingCount. + * @member {number|Long} findingCount + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.findingCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FrameworkComplianceSummary controlsPassingTrend. + * @member {google.cloud.cloudsecuritycompliance.v1.ITrend|null|undefined} controlsPassingTrend + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.controlsPassingTrend = null; + + /** + * Creates a new FrameworkComplianceSummary instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary instance + */ + FrameworkComplianceSummary.create = function create(properties) { + return new FrameworkComplianceSummary(properties); + }; + + /** + * Encodes the specified FrameworkComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary} message FrameworkComplianceSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkComplianceSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); + if (message.controlAssessmentDetails != null && Object.hasOwnProperty.call(message, "controlAssessmentDetails")) + $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.encode(message.controlAssessmentDetails, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.frameworkType != null && Object.hasOwnProperty.call(message, "frameworkType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.frameworkType); + if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + writer.int32(message.supportedCloudProviders[i]); + writer.ldelim(); + } + if (message.frameworkCategories != null && message.frameworkCategories.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (var i = 0; i < message.frameworkCategories.length; ++i) + writer.int32(message.frameworkCategories[i]); + writer.ldelim(); + } + if (message.frameworkDisplayName != null && Object.hasOwnProperty.call(message, "frameworkDisplayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.frameworkDisplayName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.majorRevisionId); + if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.minorRevisionId); + if (message.targetResourceDetails != null && message.targetResourceDetails.length) + for (var i = 0; i < message.targetResourceDetails.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.encode(message.targetResourceDetails[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.findingCount != null && Object.hasOwnProperty.call(message, "findingCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.findingCount); + if (message.controlsPassingTrend != null && Object.hasOwnProperty.call(message, "controlsPassingTrend")) + $root.google.cloud.cloudsecuritycompliance.v1.Trend.encode(message.controlsPassingTrend, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FrameworkComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary} message FrameworkComplianceSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrameworkComplianceSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrameworkComplianceSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkComplianceSummary.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.framework = reader.string(); + break; + } + case 2: { + message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.decode(reader, reader.uint32()); + break; + } + case 3: { + message.frameworkType = reader.int32(); + break; + } + case 4: { + if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) + message.supportedCloudProviders = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedCloudProviders.push(reader.int32()); + } else + message.supportedCloudProviders.push(reader.int32()); + break; + } + case 5: { + if (!(message.frameworkCategories && message.frameworkCategories.length)) + message.frameworkCategories = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.frameworkCategories.push(reader.int32()); + } else + message.frameworkCategories.push(reader.int32()); + break; + } + case 6: { + message.frameworkDisplayName = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + case 8: { + message.majorRevisionId = reader.int64(); + break; + } + case 9: { + message.minorRevisionId = reader.int64(); + break; + } + case 10: { + if (!(message.targetResourceDetails && message.targetResourceDetails.length)) + message.targetResourceDetails = []; + message.targetResourceDetails.push($root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.decode(reader, reader.uint32())); + break; + } + case 11: { + message.findingCount = reader.int64(); + break; + } + case 12: { + message.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrameworkComplianceSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrameworkComplianceSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrameworkComplianceSummary message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrameworkComplianceSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.framework != null && message.hasOwnProperty("framework")) + if (!$util.isString(message.framework)) + return "framework: string expected"; + if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify(message.controlAssessmentDetails); + if (error) + return "controlAssessmentDetails." + error; + } + if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) + switch (message.frameworkType) { + default: + return "frameworkType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { + if (!Array.isArray(message.supportedCloudProviders)) + return "supportedCloudProviders: array expected"; + for (var i = 0; i < message.supportedCloudProviders.length; ++i) + switch (message.supportedCloudProviders[i]) { + default: + return "supportedCloudProviders: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.frameworkCategories != null && message.hasOwnProperty("frameworkCategories")) { + if (!Array.isArray(message.frameworkCategories)) + return "frameworkCategories: array expected"; + for (var i = 0; i < message.frameworkCategories.length; ++i) + switch (message.frameworkCategories[i]) { + default: + return "frameworkCategories: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) + if (!$util.isString(message.frameworkDisplayName)) + return "frameworkDisplayName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) + return "minorRevisionId: integer|Long expected"; + if (message.targetResourceDetails != null && message.hasOwnProperty("targetResourceDetails")) { + if (!Array.isArray(message.targetResourceDetails)) + return "targetResourceDetails: array expected"; + for (var i = 0; i < message.targetResourceDetails.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify(message.targetResourceDetails[i]); + if (error) + return "targetResourceDetails." + error; + } + } + if (message.findingCount != null && message.hasOwnProperty("findingCount")) + if (!$util.isInteger(message.findingCount) && !(message.findingCount && $util.isInteger(message.findingCount.low) && $util.isInteger(message.findingCount.high))) + return "findingCount: integer|Long expected"; + if (message.controlsPassingTrend != null && message.hasOwnProperty("controlsPassingTrend")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Trend.verify(message.controlsPassingTrend); + if (error) + return "controlsPassingTrend." + error; + } + return null; + }; + + /** + * Creates a FrameworkComplianceSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary + */ + FrameworkComplianceSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary(); + if (object.framework != null) + message.framework = String(object.framework); + if (object.controlAssessmentDetails != null) { + if (typeof object.controlAssessmentDetails !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.controlAssessmentDetails: object expected"); + message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.fromObject(object.controlAssessmentDetails); + } + switch (object.frameworkType) { + default: + if (typeof object.frameworkType === "number") { + message.frameworkType = object.frameworkType; + break; + } + break; + case "FRAMEWORK_TYPE_UNSPECIFIED": + case 0: + message.frameworkType = 0; + break; + case "BUILT_IN": + case 1: + message.frameworkType = 1; + break; + case "CUSTOM": + case 2: + message.frameworkType = 2; + break; + } + if (object.supportedCloudProviders) { + if (!Array.isArray(object.supportedCloudProviders)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.supportedCloudProviders: array expected"); + message.supportedCloudProviders = []; + for (var i = 0; i < object.supportedCloudProviders.length; ++i) + switch (object.supportedCloudProviders[i]) { + default: + if (typeof object.supportedCloudProviders[i] === "number") { + message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; + break; + } + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.supportedCloudProviders[i] = 0; + break; + case "AWS": + case 1: + message.supportedCloudProviders[i] = 1; + break; + case "AZURE": + case 2: + message.supportedCloudProviders[i] = 2; + break; + case "GCP": + case 3: + message.supportedCloudProviders[i] = 3; + break; + } + } + if (object.frameworkCategories) { + if (!Array.isArray(object.frameworkCategories)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.frameworkCategories: array expected"); + message.frameworkCategories = []; + for (var i = 0; i < object.frameworkCategories.length; ++i) + switch (object.frameworkCategories[i]) { + default: + if (typeof object.frameworkCategories[i] === "number") { + message.frameworkCategories[i] = object.frameworkCategories[i]; + break; + } + case "FRAMEWORK_CATEGORY_UNSPECIFIED": + case 0: + message.frameworkCategories[i] = 0; + break; + case "INDUSTRY_DEFINED_STANDARD": + case 1: + message.frameworkCategories[i] = 1; + break; + case "ASSURED_WORKLOADS": + case 2: + message.frameworkCategories[i] = 2; + break; + case "DATA_SECURITY": + case 3: + message.frameworkCategories[i] = 3; + break; + case "GOOGLE_BEST_PRACTICES": + case 4: + message.frameworkCategories[i] = 4; + break; + case "CUSTOM_FRAMEWORK": + case 5: + message.frameworkCategories[i] = 5; + break; + } + } + if (object.frameworkDisplayName != null) + message.frameworkDisplayName = String(object.frameworkDisplayName); + if (object.name != null) + message.name = String(object.name); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + if (object.minorRevisionId != null) + if ($util.Long) + (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; + else if (typeof object.minorRevisionId === "string") + message.minorRevisionId = parseInt(object.minorRevisionId, 10); + else if (typeof object.minorRevisionId === "number") + message.minorRevisionId = object.minorRevisionId; + else if (typeof object.minorRevisionId === "object") + message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); + if (object.targetResourceDetails) { + if (!Array.isArray(object.targetResourceDetails)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.targetResourceDetails: array expected"); + message.targetResourceDetails = []; + for (var i = 0; i < object.targetResourceDetails.length; ++i) { + if (typeof object.targetResourceDetails[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.targetResourceDetails: object expected"); + message.targetResourceDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.fromObject(object.targetResourceDetails[i]); + } + } + if (object.findingCount != null) + if ($util.Long) + (message.findingCount = $util.Long.fromValue(object.findingCount)).unsigned = false; + else if (typeof object.findingCount === "string") + message.findingCount = parseInt(object.findingCount, 10); + else if (typeof object.findingCount === "number") + message.findingCount = object.findingCount; + else if (typeof object.findingCount === "object") + message.findingCount = new $util.LongBits(object.findingCount.low >>> 0, object.findingCount.high >>> 0).toNumber(); + if (object.controlsPassingTrend != null) { + if (typeof object.controlsPassingTrend !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.controlsPassingTrend: object expected"); + message.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.fromObject(object.controlsPassingTrend); + } + return message; + }; + + /** + * Creates a plain object from a FrameworkComplianceSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} message FrameworkComplianceSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrameworkComplianceSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.supportedCloudProviders = []; + object.frameworkCategories = []; + object.targetResourceDetails = []; + } + if (options.defaults) { + object.framework = ""; + object.controlAssessmentDetails = null; + object.frameworkType = options.enums === String ? "FRAMEWORK_TYPE_UNSPECIFIED" : 0; + object.frameworkDisplayName = ""; + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minorRevisionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.findingCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.findingCount = options.longs === String ? "0" : 0; + object.controlsPassingTrend = null; + } + if (message.framework != null && message.hasOwnProperty("framework")) + object.framework = message.framework; + if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) + object.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.toObject(message.controlAssessmentDetails, options); + if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) + object.frameworkType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] === undefined ? message.frameworkType : $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] : message.frameworkType; + if (message.supportedCloudProviders && message.supportedCloudProviders.length) { + object.supportedCloudProviders = []; + for (var j = 0; j < message.supportedCloudProviders.length; ++j) + object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; + } + if (message.frameworkCategories && message.frameworkCategories.length) { + object.frameworkCategories = []; + for (var j = 0; j < message.frameworkCategories.length; ++j) + object.frameworkCategories[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] === undefined ? message.frameworkCategories[j] : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] : message.frameworkCategories[j]; + } + if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) + object.frameworkDisplayName = message.frameworkDisplayName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (typeof message.minorRevisionId === "number") + object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; + else + object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; + if (message.targetResourceDetails && message.targetResourceDetails.length) { + object.targetResourceDetails = []; + for (var j = 0; j < message.targetResourceDetails.length; ++j) + object.targetResourceDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.toObject(message.targetResourceDetails[j], options); + } + if (message.findingCount != null && message.hasOwnProperty("findingCount")) + if (typeof message.findingCount === "number") + object.findingCount = options.longs === String ? String(message.findingCount) : message.findingCount; + else + object.findingCount = options.longs === String ? $util.Long.prototype.toString.call(message.findingCount) : options.longs === Number ? new $util.LongBits(message.findingCount.low >>> 0, message.findingCount.high >>> 0).toNumber() : message.findingCount; + if (message.controlsPassingTrend != null && message.hasOwnProperty("controlsPassingTrend")) + object.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.toObject(message.controlsPassingTrend, options); + return object; + }; + + /** + * Converts this FrameworkComplianceSummary to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + * @returns {Object.} JSON object + */ + FrameworkComplianceSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrameworkComplianceSummary + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrameworkComplianceSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary"; + }; + + return FrameworkComplianceSummary; + })(); + + v1.FindingSummary = (function() { + + /** + * Properties of a FindingSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IFindingSummary + * @property {string|null} [findingCategory] FindingSummary findingCategory + * @property {google.cloud.cloudsecuritycompliance.v1.FindingClass|null} [findingClass] FindingSummary findingClass + * @property {google.cloud.cloudsecuritycompliance.v1.Severity|null} [severity] FindingSummary severity + * @property {number|Long|null} [findingCount] FindingSummary findingCount + * @property {google.protobuf.ITimestamp|null} [updateTime] FindingSummary updateTime + * @property {Array.|null} [relatedFrameworks] FindingSummary relatedFrameworks + * @property {string|null} [name] FindingSummary name + */ + + /** + * Constructs a new FindingSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a FindingSummary. + * @implements IFindingSummary + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary=} [properties] Properties to set + */ + function FindingSummary(properties) { + this.relatedFrameworks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FindingSummary findingCategory. + * @member {string} findingCategory + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + */ + FindingSummary.prototype.findingCategory = ""; + + /** + * FindingSummary findingClass. + * @member {google.cloud.cloudsecuritycompliance.v1.FindingClass} findingClass + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + */ + FindingSummary.prototype.findingClass = 0; + + /** + * FindingSummary severity. + * @member {google.cloud.cloudsecuritycompliance.v1.Severity} severity + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + */ + FindingSummary.prototype.severity = 0; + + /** + * FindingSummary findingCount. + * @member {number|Long} findingCount + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + */ + FindingSummary.prototype.findingCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FindingSummary updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + */ + FindingSummary.prototype.updateTime = null; + + /** + * FindingSummary relatedFrameworks. + * @member {Array.} relatedFrameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + */ + FindingSummary.prototype.relatedFrameworks = $util.emptyArray; + + /** + * FindingSummary name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + */ + FindingSummary.prototype.name = ""; + + /** + * Creates a new FindingSummary instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary instance + */ + FindingSummary.create = function create(properties) { + return new FindingSummary(properties); + }; + + /** + * Encodes the specified FindingSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary} message FindingSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindingSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.findingCategory != null && Object.hasOwnProperty.call(message, "findingCategory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.findingCategory); + if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.findingClass); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.severity); + if (message.findingCount != null && Object.hasOwnProperty.call(message, "findingCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.findingCount); + 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.relatedFrameworks != null && message.relatedFrameworks.length) + for (var i = 0; i < message.relatedFrameworks.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedFrameworks[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified FindingSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary} message FindingSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindingSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FindingSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindingSummary.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.findingCategory = reader.string(); + break; + } + case 2: { + message.findingClass = reader.int32(); + break; + } + case 3: { + message.severity = reader.int32(); + break; + } + case 4: { + message.findingCount = reader.int64(); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.relatedFrameworks && message.relatedFrameworks.length)) + message.relatedFrameworks = []; + message.relatedFrameworks.push(reader.string()); + break; + } + case 7: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FindingSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindingSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FindingSummary message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FindingSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + if (!$util.isString(message.findingCategory)) + return "findingCategory: string expected"; + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + switch (message.findingClass) { + default: + return "findingClass: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.findingCount != null && message.hasOwnProperty("findingCount")) + if (!$util.isInteger(message.findingCount) && !(message.findingCount && $util.isInteger(message.findingCount.low) && $util.isInteger(message.findingCount.high))) + return "findingCount: integer|Long expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.relatedFrameworks != null && message.hasOwnProperty("relatedFrameworks")) { + if (!Array.isArray(message.relatedFrameworks)) + return "relatedFrameworks: array expected"; + for (var i = 0; i < message.relatedFrameworks.length; ++i) + if (!$util.isString(message.relatedFrameworks[i])) + return "relatedFrameworks: string[] expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FindingSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary + */ + FindingSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary(); + if (object.findingCategory != null) + message.findingCategory = String(object.findingCategory); + switch (object.findingClass) { + default: + if (typeof object.findingClass === "number") { + message.findingClass = object.findingClass; + break; + } + break; + case "FINDING_CLASS_UNSPECIFIED": + case 0: + message.findingClass = 0; + break; + case "THREAT": + case 1: + message.findingClass = 1; + break; + case "VULNERABILITY": + case 2: + message.findingClass = 2; + break; + case "MISCONFIGURATION": + case 3: + message.findingClass = 3; + break; + case "OBSERVATION": + case 4: + message.findingClass = 4; + break; + case "SCC_ERROR": + case 5: + message.findingClass = 5; + break; + case "POSTURE_VIOLATION": + case 6: + message.findingClass = 6; + break; + case "TOXIC_COMBINATION": + case 7: + message.findingClass = 7; + break; + case "SENSITIVE_DATA_RISK": + case 8: + message.findingClass = 8; + break; + case "CHOKEPOINT": + case 9: + message.findingClass = 9; + break; + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "CRITICAL": + case 1: + message.severity = 1; + break; + case "HIGH": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "LOW": + case 4: + message.severity = 4; + break; + } + if (object.findingCount != null) + if ($util.Long) + (message.findingCount = $util.Long.fromValue(object.findingCount)).unsigned = false; + else if (typeof object.findingCount === "string") + message.findingCount = parseInt(object.findingCount, 10); + else if (typeof object.findingCount === "number") + message.findingCount = object.findingCount; + else if (typeof object.findingCount === "object") + message.findingCount = new $util.LongBits(object.findingCount.low >>> 0, object.findingCount.high >>> 0).toNumber(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingSummary.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.relatedFrameworks) { + if (!Array.isArray(object.relatedFrameworks)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingSummary.relatedFrameworks: array expected"); + message.relatedFrameworks = []; + for (var i = 0; i < object.relatedFrameworks.length; ++i) + message.relatedFrameworks[i] = String(object.relatedFrameworks[i]); + } + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FindingSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.FindingSummary} message FindingSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FindingSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedFrameworks = []; + if (options.defaults) { + object.findingCategory = ""; + object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.findingCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.findingCount = options.longs === String ? "0" : 0; + object.updateTime = null; + object.name = ""; + } + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + object.findingCategory = message.findingCategory; + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + object.findingClass = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.cloudsecuritycompliance.v1.FindingClass[message.findingClass] : message.findingClass; + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] : message.severity; + if (message.findingCount != null && message.hasOwnProperty("findingCount")) + if (typeof message.findingCount === "number") + object.findingCount = options.longs === String ? String(message.findingCount) : message.findingCount; + else + object.findingCount = options.longs === String ? $util.Long.prototype.toString.call(message.findingCount) : options.longs === Number ? new $util.LongBits(message.findingCount.low >>> 0, message.findingCount.high >>> 0).toNumber() : message.findingCount; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.relatedFrameworks && message.relatedFrameworks.length) { + object.relatedFrameworks = []; + for (var j = 0; j < message.relatedFrameworks.length; ++j) + object.relatedFrameworks[j] = message.relatedFrameworks[j]; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FindingSummary to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @instance + * @returns {Object.} JSON object + */ + FindingSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FindingSummary + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FindingSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FindingSummary"; + }; + + return FindingSummary; + })(); + + v1.ControlComplianceSummary = (function() { + + /** + * Properties of a ControlComplianceSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IControlComplianceSummary + * @property {string|null} [control] ControlComplianceSummary control + * @property {string|null} [displayName] ControlComplianceSummary displayName + * @property {string|null} [description] ControlComplianceSummary description + * @property {google.cloud.cloudsecuritycompliance.v1.EvaluationState|null} [overallEvaluationState] ControlComplianceSummary overallEvaluationState + * @property {number|null} [totalFindingsCount] ControlComplianceSummary totalFindingsCount + * @property {Array.|null} [complianceFrameworks] ControlComplianceSummary complianceFrameworks + * @property {Array.|null} [similarControls] ControlComplianceSummary similarControls + * @property {Array.|null} [cloudControlReports] ControlComplianceSummary cloudControlReports + * @property {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null} [controlResponsibilityType] ControlComplianceSummary controlResponsibilityType + * @property {boolean|null} [isFakeControl] ControlComplianceSummary isFakeControl + * @property {string|null} [name] ControlComplianceSummary name + */ + + /** + * Constructs a new ControlComplianceSummary. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ControlComplianceSummary. + * @implements IControlComplianceSummary + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary=} [properties] Properties to set + */ + function ControlComplianceSummary(properties) { + this.complianceFrameworks = []; + this.similarControls = []; + this.cloudControlReports = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ControlComplianceSummary control. + * @member {string} control + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.control = ""; + + /** + * ControlComplianceSummary displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.displayName = ""; + + /** + * ControlComplianceSummary description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.description = ""; + + /** + * ControlComplianceSummary overallEvaluationState. + * @member {google.cloud.cloudsecuritycompliance.v1.EvaluationState} overallEvaluationState + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.overallEvaluationState = 0; + + /** + * ControlComplianceSummary totalFindingsCount. + * @member {number} totalFindingsCount + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.totalFindingsCount = 0; + + /** + * ControlComplianceSummary complianceFrameworks. + * @member {Array.} complianceFrameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.complianceFrameworks = $util.emptyArray; + + /** + * ControlComplianceSummary similarControls. + * @member {Array.} similarControls + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.similarControls = $util.emptyArray; + + /** + * ControlComplianceSummary cloudControlReports. + * @member {Array.} cloudControlReports + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.cloudControlReports = $util.emptyArray; + + /** + * ControlComplianceSummary controlResponsibilityType. + * @member {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType} controlResponsibilityType + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.controlResponsibilityType = 0; + + /** + * ControlComplianceSummary isFakeControl. + * @member {boolean} isFakeControl + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.isFakeControl = false; + + /** + * ControlComplianceSummary name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + */ + ControlComplianceSummary.prototype.name = ""; + + /** + * Creates a new ControlComplianceSummary instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary instance + */ + ControlComplianceSummary.create = function create(properties) { + return new ControlComplianceSummary(properties); + }; + + /** + * Encodes the specified ControlComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary} message ControlComplianceSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlComplianceSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.control != null && Object.hasOwnProperty.call(message, "control")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.control); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.overallEvaluationState != null && Object.hasOwnProperty.call(message, "overallEvaluationState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.overallEvaluationState); + if (message.totalFindingsCount != null && Object.hasOwnProperty.call(message, "totalFindingsCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalFindingsCount); + if (message.complianceFrameworks != null && message.complianceFrameworks.length) + for (var i = 0; i < message.complianceFrameworks.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.complianceFrameworks[i]); + if (message.similarControls != null && message.similarControls.length) + for (var i = 0; i < message.similarControls.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.encode(message.similarControls[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.cloudControlReports != null && message.cloudControlReports.length) + for (var i = 0; i < message.cloudControlReports.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.encode(message.cloudControlReports[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.controlResponsibilityType != null && Object.hasOwnProperty.call(message, "controlResponsibilityType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.controlResponsibilityType); + if (message.isFakeControl != null && Object.hasOwnProperty.call(message, "isFakeControl")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isFakeControl); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.name); + return writer; + }; + + /** + * Encodes the specified ControlComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary} message ControlComplianceSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ControlComplianceSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ControlComplianceSummary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlComplianceSummary.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.control = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.overallEvaluationState = reader.int32(); + break; + } + case 5: { + message.totalFindingsCount = reader.int32(); + break; + } + case 6: { + if (!(message.complianceFrameworks && message.complianceFrameworks.length)) + message.complianceFrameworks = []; + message.complianceFrameworks.push(reader.string()); + break; + } + case 7: { + if (!(message.similarControls && message.similarControls.length)) + message.similarControls = []; + message.similarControls.push($root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.cloudControlReports && message.cloudControlReports.length)) + message.cloudControlReports = []; + message.cloudControlReports.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.decode(reader, reader.uint32())); + break; + } + case 9: { + message.controlResponsibilityType = reader.int32(); + break; + } + case 10: { + message.isFakeControl = reader.bool(); + break; + } + case 11: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ControlComplianceSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ControlComplianceSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ControlComplianceSummary message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ControlComplianceSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.control != null && message.hasOwnProperty("control")) + if (!$util.isString(message.control)) + return "control: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.overallEvaluationState != null && message.hasOwnProperty("overallEvaluationState")) + switch (message.overallEvaluationState) { + default: + return "overallEvaluationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.totalFindingsCount != null && message.hasOwnProperty("totalFindingsCount")) + if (!$util.isInteger(message.totalFindingsCount)) + return "totalFindingsCount: integer expected"; + if (message.complianceFrameworks != null && message.hasOwnProperty("complianceFrameworks")) { + if (!Array.isArray(message.complianceFrameworks)) + return "complianceFrameworks: array expected"; + for (var i = 0; i < message.complianceFrameworks.length; ++i) + if (!$util.isString(message.complianceFrameworks[i])) + return "complianceFrameworks: string[] expected"; + } + if (message.similarControls != null && message.hasOwnProperty("similarControls")) { + if (!Array.isArray(message.similarControls)) + return "similarControls: array expected"; + for (var i = 0; i < message.similarControls.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify(message.similarControls[i]); + if (error) + return "similarControls." + error; + } + } + if (message.cloudControlReports != null && message.hasOwnProperty("cloudControlReports")) { + if (!Array.isArray(message.cloudControlReports)) + return "cloudControlReports: array expected"; + for (var i = 0; i < message.cloudControlReports.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify(message.cloudControlReports[i]); + if (error) + return "cloudControlReports." + error; + } + } + if (message.controlResponsibilityType != null && message.hasOwnProperty("controlResponsibilityType")) + switch (message.controlResponsibilityType) { + default: + return "controlResponsibilityType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.isFakeControl != null && message.hasOwnProperty("isFakeControl")) + if (typeof message.isFakeControl !== "boolean") + return "isFakeControl: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a ControlComplianceSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary + */ + ControlComplianceSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary(); + if (object.control != null) + message.control = String(object.control); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.overallEvaluationState) { + default: + if (typeof object.overallEvaluationState === "number") { + message.overallEvaluationState = object.overallEvaluationState; + break; + } + break; + case "EVALUATION_STATE_UNSPECIFIED": + case 0: + message.overallEvaluationState = 0; + break; + case "EVALUATION_STATE_PASSED": + case 1: + message.overallEvaluationState = 1; + break; + case "EVALUATION_STATE_FAILED": + case 2: + message.overallEvaluationState = 2; + break; + case "EVALUATION_STATE_NOT_ASSESSED": + case 3: + message.overallEvaluationState = 3; + break; + } + if (object.totalFindingsCount != null) + message.totalFindingsCount = object.totalFindingsCount | 0; + if (object.complianceFrameworks) { + if (!Array.isArray(object.complianceFrameworks)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.complianceFrameworks: array expected"); + message.complianceFrameworks = []; + for (var i = 0; i < object.complianceFrameworks.length; ++i) + message.complianceFrameworks[i] = String(object.complianceFrameworks[i]); + } + if (object.similarControls) { + if (!Array.isArray(object.similarControls)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.similarControls: array expected"); + message.similarControls = []; + for (var i = 0; i < object.similarControls.length; ++i) { + if (typeof object.similarControls[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.similarControls: object expected"); + message.similarControls[i] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.fromObject(object.similarControls[i]); + } + } + if (object.cloudControlReports) { + if (!Array.isArray(object.cloudControlReports)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.cloudControlReports: array expected"); + message.cloudControlReports = []; + for (var i = 0; i < object.cloudControlReports.length; ++i) { + if (typeof object.cloudControlReports[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.cloudControlReports: object expected"); + message.cloudControlReports[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.fromObject(object.cloudControlReports[i]); + } + } + switch (object.controlResponsibilityType) { + default: + if (typeof object.controlResponsibilityType === "number") { + message.controlResponsibilityType = object.controlResponsibilityType; + break; + } + break; + case "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED": + case 0: + message.controlResponsibilityType = 0; + break; + case "GOOGLE": + case 1: + message.controlResponsibilityType = 1; + break; + case "CUSTOMER": + case 2: + message.controlResponsibilityType = 2; + break; + case "SHARED": + case 3: + message.controlResponsibilityType = 3; + break; + } + if (object.isFakeControl != null) + message.isFakeControl = Boolean(object.isFakeControl); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ControlComplianceSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} message ControlComplianceSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ControlComplianceSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.complianceFrameworks = []; + object.similarControls = []; + object.cloudControlReports = []; + } + if (options.defaults) { + object.control = ""; + object.displayName = ""; + object.description = ""; + object.overallEvaluationState = options.enums === String ? "EVALUATION_STATE_UNSPECIFIED" : 0; + object.totalFindingsCount = 0; + object.controlResponsibilityType = options.enums === String ? "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" : 0; + object.isFakeControl = false; + object.name = ""; + } + if (message.control != null && message.hasOwnProperty("control")) + object.control = message.control; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.overallEvaluationState != null && message.hasOwnProperty("overallEvaluationState")) + object.overallEvaluationState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.overallEvaluationState] === undefined ? message.overallEvaluationState : $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.overallEvaluationState] : message.overallEvaluationState; + if (message.totalFindingsCount != null && message.hasOwnProperty("totalFindingsCount")) + object.totalFindingsCount = message.totalFindingsCount; + if (message.complianceFrameworks && message.complianceFrameworks.length) { + object.complianceFrameworks = []; + for (var j = 0; j < message.complianceFrameworks.length; ++j) + object.complianceFrameworks[j] = message.complianceFrameworks[j]; + } + if (message.similarControls && message.similarControls.length) { + object.similarControls = []; + for (var j = 0; j < message.similarControls.length; ++j) + object.similarControls[j] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.toObject(message.similarControls[j], options); + } + if (message.cloudControlReports && message.cloudControlReports.length) { + object.cloudControlReports = []; + for (var j = 0; j < message.cloudControlReports.length; ++j) + object.cloudControlReports[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.toObject(message.cloudControlReports[j], options); + } + if (message.controlResponsibilityType != null && message.hasOwnProperty("controlResponsibilityType")) + object.controlResponsibilityType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.controlResponsibilityType] === undefined ? message.controlResponsibilityType : $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.controlResponsibilityType] : message.controlResponsibilityType; + if (message.isFakeControl != null && message.hasOwnProperty("isFakeControl")) + object.isFakeControl = message.isFakeControl; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ControlComplianceSummary to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @instance + * @returns {Object.} JSON object + */ + ControlComplianceSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ControlComplianceSummary + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ControlComplianceSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary"; + }; + + return ControlComplianceSummary; + })(); + + v1.CloudControlReport = (function() { + + /** + * Properties of a CloudControlReport. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlReport + * @property {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null} [manualCloudControlAssessmentDetails] CloudControlReport manualCloudControlAssessmentDetails + * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null} [cloudControlAssessmentDetails] CloudControlReport cloudControlAssessmentDetails + * @property {string|null} [cloudControl] CloudControlReport cloudControl + * @property {string|null} [displayName] CloudControlReport displayName + * @property {string|null} [description] CloudControlReport description + * @property {Array.|null} [categories] CloudControlReport categories + * @property {Array.|null} [similarControls] CloudControlReport similarControls + * @property {google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|null} [cloudControlType] CloudControlReport cloudControlType + * @property {string|null} [findingCategory] CloudControlReport findingCategory + * @property {Array.|null} [rules] CloudControlReport rules + * @property {google.cloud.cloudsecuritycompliance.v1.Severity|null} [findingSeverity] CloudControlReport findingSeverity + * @property {google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null} [enforcementMode] CloudControlReport enforcementMode + * @property {string|null} [cloudControlDeployment] CloudControlReport cloudControlDeployment + * @property {number|Long|null} [majorRevisionId] CloudControlReport majorRevisionId + * @property {number|Long|null} [minorRevisionId] CloudControlReport minorRevisionId + * @property {Array.|null} [frameworkMajorRevisionIds] CloudControlReport frameworkMajorRevisionIds + */ + + /** + * Constructs a new CloudControlReport. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlReport. + * @implements ICloudControlReport + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport=} [properties] Properties to set + */ + function CloudControlReport(properties) { + this.categories = []; + this.similarControls = []; + this.rules = []; + this.frameworkMajorRevisionIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlReport manualCloudControlAssessmentDetails. + * @member {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null|undefined} manualCloudControlAssessmentDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.manualCloudControlAssessmentDetails = null; + + /** + * CloudControlReport cloudControlAssessmentDetails. + * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null|undefined} cloudControlAssessmentDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.cloudControlAssessmentDetails = null; + + /** + * CloudControlReport cloudControl. + * @member {string} cloudControl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.cloudControl = ""; + + /** + * CloudControlReport displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.displayName = ""; + + /** + * CloudControlReport description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.description = ""; + + /** + * CloudControlReport categories. + * @member {Array.} categories + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.categories = $util.emptyArray; + + /** + * CloudControlReport similarControls. + * @member {Array.} similarControls + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.similarControls = $util.emptyArray; + + /** + * CloudControlReport cloudControlType. + * @member {google.cloud.cloudsecuritycompliance.v1.CloudControl.Type} cloudControlType + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.cloudControlType = 0; + + /** + * CloudControlReport findingCategory. + * @member {string} findingCategory + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.findingCategory = ""; + + /** + * CloudControlReport rules. + * @member {Array.} rules + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.rules = $util.emptyArray; + + /** + * CloudControlReport findingSeverity. + * @member {google.cloud.cloudsecuritycompliance.v1.Severity} findingSeverity + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.findingSeverity = 0; + + /** + * CloudControlReport enforcementMode. + * @member {google.cloud.cloudsecuritycompliance.v1.EnforcementMode} enforcementMode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.enforcementMode = 0; + + /** + * CloudControlReport cloudControlDeployment. + * @member {string} cloudControlDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.cloudControlDeployment = ""; + + /** + * CloudControlReport majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CloudControlReport minorRevisionId. + * @member {number|Long} minorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CloudControlReport frameworkMajorRevisionIds. + * @member {Array.} frameworkMajorRevisionIds + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + CloudControlReport.prototype.frameworkMajorRevisionIds = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudControlReport assessmentDetails. + * @member {"manualCloudControlAssessmentDetails"|"cloudControlAssessmentDetails"|undefined} assessmentDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + */ + Object.defineProperty(CloudControlReport.prototype, "assessmentDetails", { + get: $util.oneOfGetter($oneOfFields = ["manualCloudControlAssessmentDetails", "cloudControlAssessmentDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudControlReport instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport instance + */ + CloudControlReport.create = function create(properties) { + return new CloudControlReport(properties); + }; + + /** + * Encodes the specified CloudControlReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport} message CloudControlReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControl); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.categories[i]); + if (message.similarControls != null && message.similarControls.length) + for (var i = 0; i < message.similarControls.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.encode(message.similarControls[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.cloudControlType != null && Object.hasOwnProperty.call(message, "cloudControlType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.cloudControlType); + if (message.findingCategory != null && Object.hasOwnProperty.call(message, "findingCategory")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.findingCategory); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.cloudsecuritycompliance.v1.Rule.encode(message.rules[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.manualCloudControlAssessmentDetails != null && Object.hasOwnProperty.call(message, "manualCloudControlAssessmentDetails")) + $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.encode(message.manualCloudControlAssessmentDetails, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.cloudControlAssessmentDetails != null && Object.hasOwnProperty.call(message, "cloudControlAssessmentDetails")) + $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.encode(message.cloudControlAssessmentDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.findingSeverity != null && Object.hasOwnProperty.call(message, "findingSeverity")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.findingSeverity); + if (message.enforcementMode != null && Object.hasOwnProperty.call(message, "enforcementMode")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.enforcementMode); + if (message.cloudControlDeployment != null && Object.hasOwnProperty.call(message, "cloudControlDeployment")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.cloudControlDeployment); + if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 18, wireType 0 =*/144).int64(message.majorRevisionId); + if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) + writer.uint32(/* id 19, wireType 0 =*/152).int64(message.minorRevisionId); + if (message.frameworkMajorRevisionIds != null && message.frameworkMajorRevisionIds.length) { + writer.uint32(/* id 20, wireType 2 =*/162).fork(); + for (var i = 0; i < message.frameworkMajorRevisionIds.length; ++i) + writer.int64(message.frameworkMajorRevisionIds[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CloudControlReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport} message CloudControlReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlReport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 13: { + message.manualCloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.cloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.decode(reader, reader.uint32()); + break; + } + case 1: { + message.cloudControl = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 6: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push(reader.string()); + break; + } + case 9: { + if (!(message.similarControls && message.similarControls.length)) + message.similarControls = []; + message.similarControls.push($root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.decode(reader, reader.uint32())); + break; + } + case 10: { + message.cloudControlType = reader.int32(); + break; + } + case 11: { + message.findingCategory = reader.string(); + break; + } + case 12: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.cloudsecuritycompliance.v1.Rule.decode(reader, reader.uint32())); + break; + } + case 15: { + message.findingSeverity = reader.int32(); + break; + } + case 16: { + message.enforcementMode = reader.int32(); + break; + } + case 17: { + message.cloudControlDeployment = reader.string(); + break; + } + case 18: { + message.majorRevisionId = reader.int64(); + break; + } + case 19: { + message.minorRevisionId = reader.int64(); + break; + } + case 20: { + if (!(message.frameworkMajorRevisionIds && message.frameworkMajorRevisionIds.length)) + message.frameworkMajorRevisionIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.frameworkMajorRevisionIds.push(reader.int64()); + } else + message.frameworkMajorRevisionIds.push(reader.int64()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlReport message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.manualCloudControlAssessmentDetails != null && message.hasOwnProperty("manualCloudControlAssessmentDetails")) { + properties.assessmentDetails = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify(message.manualCloudControlAssessmentDetails); + if (error) + return "manualCloudControlAssessmentDetails." + error; + } + } + if (message.cloudControlAssessmentDetails != null && message.hasOwnProperty("cloudControlAssessmentDetails")) { + if (properties.assessmentDetails === 1) + return "assessmentDetails: multiple values"; + properties.assessmentDetails = 1; + { + var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify(message.cloudControlAssessmentDetails); + if (error) + return "cloudControlAssessmentDetails." + error; + } + } + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) + if (!$util.isString(message.cloudControl)) + return "cloudControl: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) + if (!$util.isString(message.categories[i])) + return "categories: string[] expected"; + } + if (message.similarControls != null && message.hasOwnProperty("similarControls")) { + if (!Array.isArray(message.similarControls)) + return "similarControls: array expected"; + for (var i = 0; i < message.similarControls.length; ++i) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify(message.similarControls[i]); + if (error) + return "similarControls." + error; + } + } + if (message.cloudControlType != null && message.hasOwnProperty("cloudControlType")) + switch (message.cloudControlType) { + default: + return "cloudControlType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + if (!$util.isString(message.findingCategory)) + return "findingCategory: 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.cloud.cloudsecuritycompliance.v1.Rule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.findingSeverity != null && message.hasOwnProperty("findingSeverity")) + switch (message.findingSeverity) { + default: + return "findingSeverity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) + switch (message.enforcementMode) { + default: + return "enforcementMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) + if (!$util.isString(message.cloudControlDeployment)) + return "cloudControlDeployment: string expected"; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) + return "minorRevisionId: integer|Long expected"; + if (message.frameworkMajorRevisionIds != null && message.hasOwnProperty("frameworkMajorRevisionIds")) { + if (!Array.isArray(message.frameworkMajorRevisionIds)) + return "frameworkMajorRevisionIds: array expected"; + for (var i = 0; i < message.frameworkMajorRevisionIds.length; ++i) + if (!$util.isInteger(message.frameworkMajorRevisionIds[i]) && !(message.frameworkMajorRevisionIds[i] && $util.isInteger(message.frameworkMajorRevisionIds[i].low) && $util.isInteger(message.frameworkMajorRevisionIds[i].high))) + return "frameworkMajorRevisionIds: integer|Long[] expected"; + } + return null; + }; + + /** + * Creates a CloudControlReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport + */ + CloudControlReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport(); + if (object.manualCloudControlAssessmentDetails != null) { + if (typeof object.manualCloudControlAssessmentDetails !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.manualCloudControlAssessmentDetails: object expected"); + message.manualCloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.fromObject(object.manualCloudControlAssessmentDetails); + } + if (object.cloudControlAssessmentDetails != null) { + if (typeof object.cloudControlAssessmentDetails !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.cloudControlAssessmentDetails: object expected"); + message.cloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.fromObject(object.cloudControlAssessmentDetails); + } + if (object.cloudControl != null) + message.cloudControl = String(object.cloudControl); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) + message.categories[i] = String(object.categories[i]); + } + if (object.similarControls) { + if (!Array.isArray(object.similarControls)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.similarControls: array expected"); + message.similarControls = []; + for (var i = 0; i < object.similarControls.length; ++i) { + if (typeof object.similarControls[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.similarControls: object expected"); + message.similarControls[i] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.fromObject(object.similarControls[i]); + } + } + switch (object.cloudControlType) { + default: + if (typeof object.cloudControlType === "number") { + message.cloudControlType = object.cloudControlType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.cloudControlType = 0; + break; + case "CUSTOM": + case 1: + message.cloudControlType = 1; + break; + case "BUILT_IN": + case 2: + message.cloudControlType = 2; + break; + } + if (object.findingCategory != null) + message.findingCategory = String(object.findingCategory); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.rules: object expected"); + message.rules[i] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.fromObject(object.rules[i]); + } + } + switch (object.findingSeverity) { + default: + if (typeof object.findingSeverity === "number") { + message.findingSeverity = object.findingSeverity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.findingSeverity = 0; + break; + case "CRITICAL": + case 1: + message.findingSeverity = 1; + break; + case "HIGH": + case 2: + message.findingSeverity = 2; + break; + case "MEDIUM": + case 3: + message.findingSeverity = 3; + break; + case "LOW": + case 4: + message.findingSeverity = 4; + break; + } + switch (object.enforcementMode) { + default: + if (typeof object.enforcementMode === "number") { + message.enforcementMode = object.enforcementMode; + break; + } + break; + case "ENFORCEMENT_MODE_UNSPECIFIED": + case 0: + message.enforcementMode = 0; + break; + case "PREVENTIVE": + case 1: + message.enforcementMode = 1; + break; + case "DETECTIVE": + case 2: + message.enforcementMode = 2; + break; + case "AUDIT": + case 3: + message.enforcementMode = 3; + break; + } + if (object.cloudControlDeployment != null) + message.cloudControlDeployment = String(object.cloudControlDeployment); + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + if (object.minorRevisionId != null) + if ($util.Long) + (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; + else if (typeof object.minorRevisionId === "string") + message.minorRevisionId = parseInt(object.minorRevisionId, 10); + else if (typeof object.minorRevisionId === "number") + message.minorRevisionId = object.minorRevisionId; + else if (typeof object.minorRevisionId === "object") + message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); + if (object.frameworkMajorRevisionIds) { + if (!Array.isArray(object.frameworkMajorRevisionIds)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.frameworkMajorRevisionIds: array expected"); + message.frameworkMajorRevisionIds = []; + for (var i = 0; i < object.frameworkMajorRevisionIds.length; ++i) + if ($util.Long) + (message.frameworkMajorRevisionIds[i] = $util.Long.fromValue(object.frameworkMajorRevisionIds[i])).unsigned = false; + else if (typeof object.frameworkMajorRevisionIds[i] === "string") + message.frameworkMajorRevisionIds[i] = parseInt(object.frameworkMajorRevisionIds[i], 10); + else if (typeof object.frameworkMajorRevisionIds[i] === "number") + message.frameworkMajorRevisionIds[i] = object.frameworkMajorRevisionIds[i]; + else if (typeof object.frameworkMajorRevisionIds[i] === "object") + message.frameworkMajorRevisionIds[i] = new $util.LongBits(object.frameworkMajorRevisionIds[i].low >>> 0, object.frameworkMajorRevisionIds[i].high >>> 0).toNumber(); + } + return message; + }; + + /** + * Creates a plain object from a CloudControlReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} message CloudControlReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.categories = []; + object.similarControls = []; + object.rules = []; + object.frameworkMajorRevisionIds = []; + } + if (options.defaults) { + object.cloudControl = ""; + object.displayName = ""; + object.description = ""; + object.cloudControlType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.findingCategory = ""; + object.findingSeverity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.enforcementMode = options.enums === String ? "ENFORCEMENT_MODE_UNSPECIFIED" : 0; + object.cloudControlDeployment = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minorRevisionId = options.longs === String ? "0" : 0; + } + if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) + object.cloudControl = message.cloudControl; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = message.categories[j]; + } + if (message.similarControls && message.similarControls.length) { + object.similarControls = []; + for (var j = 0; j < message.similarControls.length; ++j) + object.similarControls[j] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.toObject(message.similarControls[j], options); + } + if (message.cloudControlType != null && message.hasOwnProperty("cloudControlType")) + object.cloudControlType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type[message.cloudControlType] === undefined ? message.cloudControlType : $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type[message.cloudControlType] : message.cloudControlType; + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + object.findingCategory = message.findingCategory; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.toObject(message.rules[j], options); + } + if (message.manualCloudControlAssessmentDetails != null && message.hasOwnProperty("manualCloudControlAssessmentDetails")) { + object.manualCloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.toObject(message.manualCloudControlAssessmentDetails, options); + if (options.oneofs) + object.assessmentDetails = "manualCloudControlAssessmentDetails"; + } + if (message.cloudControlAssessmentDetails != null && message.hasOwnProperty("cloudControlAssessmentDetails")) { + object.cloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.toObject(message.cloudControlAssessmentDetails, options); + if (options.oneofs) + object.assessmentDetails = "cloudControlAssessmentDetails"; + } + if (message.findingSeverity != null && message.hasOwnProperty("findingSeverity")) + object.findingSeverity = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.findingSeverity] === undefined ? message.findingSeverity : $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.findingSeverity] : message.findingSeverity; + if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) + object.enforcementMode = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] === undefined ? message.enforcementMode : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] : message.enforcementMode; + if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) + object.cloudControlDeployment = message.cloudControlDeployment; + if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (typeof message.minorRevisionId === "number") + object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; + else + object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; + if (message.frameworkMajorRevisionIds && message.frameworkMajorRevisionIds.length) { + object.frameworkMajorRevisionIds = []; + for (var j = 0; j < message.frameworkMajorRevisionIds.length; ++j) + if (typeof message.frameworkMajorRevisionIds[j] === "number") + object.frameworkMajorRevisionIds[j] = options.longs === String ? String(message.frameworkMajorRevisionIds[j]) : message.frameworkMajorRevisionIds[j]; + else + object.frameworkMajorRevisionIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.frameworkMajorRevisionIds[j]) : options.longs === Number ? new $util.LongBits(message.frameworkMajorRevisionIds[j].low >>> 0, message.frameworkMajorRevisionIds[j].high >>> 0).toNumber() : message.frameworkMajorRevisionIds[j]; + } + return object; + }; + + /** + * Converts this CloudControlReport to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @instance + * @returns {Object.} JSON object + */ + CloudControlReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlReport + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlReport"; + }; + + return CloudControlReport; + })(); + + v1.ManualCloudControlAssessmentDetails = (function() { + + /** + * Properties of a ManualCloudControlAssessmentDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IManualCloudControlAssessmentDetails + * @property {Array.|null} [manualCloudControlGuide] ManualCloudControlAssessmentDetails manualCloudControlGuide + */ + + /** + * Constructs a new ManualCloudControlAssessmentDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a ManualCloudControlAssessmentDetails. + * @implements IManualCloudControlAssessmentDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails=} [properties] Properties to set + */ + function ManualCloudControlAssessmentDetails(properties) { + this.manualCloudControlGuide = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManualCloudControlAssessmentDetails manualCloudControlGuide. + * @member {Array.} manualCloudControlGuide + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @instance + */ + ManualCloudControlAssessmentDetails.prototype.manualCloudControlGuide = $util.emptyArray; + + /** + * Creates a new ManualCloudControlAssessmentDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails instance + */ + ManualCloudControlAssessmentDetails.create = function create(properties) { + return new ManualCloudControlAssessmentDetails(properties); + }; + + /** + * Encodes the specified ManualCloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails} message ManualCloudControlAssessmentDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManualCloudControlAssessmentDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.manualCloudControlGuide != null && message.manualCloudControlGuide.length) + for (var i = 0; i < message.manualCloudControlGuide.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.manualCloudControlGuide[i]); + return writer; + }; + + /** + * Encodes the specified ManualCloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails} message ManualCloudControlAssessmentDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManualCloudControlAssessmentDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManualCloudControlAssessmentDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.manualCloudControlGuide && message.manualCloudControlGuide.length)) + message.manualCloudControlGuide = []; + message.manualCloudControlGuide.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManualCloudControlAssessmentDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManualCloudControlAssessmentDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManualCloudControlAssessmentDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.manualCloudControlGuide != null && message.hasOwnProperty("manualCloudControlGuide")) { + if (!Array.isArray(message.manualCloudControlGuide)) + return "manualCloudControlGuide: array expected"; + for (var i = 0; i < message.manualCloudControlGuide.length; ++i) + if (!$util.isString(message.manualCloudControlGuide[i])) + return "manualCloudControlGuide: string[] expected"; + } + return null; + }; + + /** + * Creates a ManualCloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails + */ + ManualCloudControlAssessmentDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails(); + if (object.manualCloudControlGuide) { + if (!Array.isArray(object.manualCloudControlGuide)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.manualCloudControlGuide: array expected"); + message.manualCloudControlGuide = []; + for (var i = 0; i < object.manualCloudControlGuide.length; ++i) + message.manualCloudControlGuide[i] = String(object.manualCloudControlGuide[i]); + } + return message; + }; + + /** + * Creates a plain object from a ManualCloudControlAssessmentDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} message ManualCloudControlAssessmentDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManualCloudControlAssessmentDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.manualCloudControlGuide = []; + if (message.manualCloudControlGuide && message.manualCloudControlGuide.length) { + object.manualCloudControlGuide = []; + for (var j = 0; j < message.manualCloudControlGuide.length; ++j) + object.manualCloudControlGuide[j] = message.manualCloudControlGuide[j]; + } + return object; + }; + + /** + * Converts this ManualCloudControlAssessmentDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @instance + * @returns {Object.} JSON object + */ + ManualCloudControlAssessmentDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManualCloudControlAssessmentDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManualCloudControlAssessmentDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails"; + }; + + return ManualCloudControlAssessmentDetails; + })(); + + v1.CloudControlAssessmentDetails = (function() { + + /** + * Properties of a CloudControlAssessmentDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ICloudControlAssessmentDetails + * @property {number|null} [findingsCount] CloudControlAssessmentDetails findingsCount + * @property {google.cloud.cloudsecuritycompliance.v1.EvaluationState|null} [evaluationState] CloudControlAssessmentDetails evaluationState + */ + + /** + * Constructs a new CloudControlAssessmentDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a CloudControlAssessmentDetails. + * @implements ICloudControlAssessmentDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails=} [properties] Properties to set + */ + function CloudControlAssessmentDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudControlAssessmentDetails findingsCount. + * @member {number} findingsCount + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @instance + */ + CloudControlAssessmentDetails.prototype.findingsCount = 0; + + /** + * CloudControlAssessmentDetails evaluationState. + * @member {google.cloud.cloudsecuritycompliance.v1.EvaluationState} evaluationState + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @instance + */ + CloudControlAssessmentDetails.prototype.evaluationState = 0; + + /** + * Creates a new CloudControlAssessmentDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails instance + */ + CloudControlAssessmentDetails.create = function create(properties) { + return new CloudControlAssessmentDetails(properties); + }; + + /** + * Encodes the specified CloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails} message CloudControlAssessmentDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlAssessmentDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.findingsCount != null && Object.hasOwnProperty.call(message, "findingsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.findingsCount); + if (message.evaluationState != null && Object.hasOwnProperty.call(message, "evaluationState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluationState); + return writer; + }; + + /** + * Encodes the specified CloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails} message CloudControlAssessmentDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudControlAssessmentDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlAssessmentDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.findingsCount = reader.int32(); + break; + } + case 2: { + message.evaluationState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudControlAssessmentDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudControlAssessmentDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudControlAssessmentDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.findingsCount != null && message.hasOwnProperty("findingsCount")) + if (!$util.isInteger(message.findingsCount)) + return "findingsCount: integer expected"; + if (message.evaluationState != null && message.hasOwnProperty("evaluationState")) + switch (message.evaluationState) { + default: + return "evaluationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a CloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails + */ + CloudControlAssessmentDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails(); + if (object.findingsCount != null) + message.findingsCount = object.findingsCount | 0; + switch (object.evaluationState) { + default: + if (typeof object.evaluationState === "number") { + message.evaluationState = object.evaluationState; + break; + } + break; + case "EVALUATION_STATE_UNSPECIFIED": + case 0: + message.evaluationState = 0; + break; + case "EVALUATION_STATE_PASSED": + case 1: + message.evaluationState = 1; + break; + case "EVALUATION_STATE_FAILED": + case 2: + message.evaluationState = 2; + break; + case "EVALUATION_STATE_NOT_ASSESSED": + case 3: + message.evaluationState = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a CloudControlAssessmentDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} message CloudControlAssessmentDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudControlAssessmentDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.findingsCount = 0; + object.evaluationState = options.enums === String ? "EVALUATION_STATE_UNSPECIFIED" : 0; + } + if (message.findingsCount != null && message.hasOwnProperty("findingsCount")) + object.findingsCount = message.findingsCount; + if (message.evaluationState != null && message.hasOwnProperty("evaluationState")) + object.evaluationState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.evaluationState] === undefined ? message.evaluationState : $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.evaluationState] : message.evaluationState; + return object; + }; + + /** + * Converts this CloudControlAssessmentDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @instance + * @returns {Object.} JSON object + */ + CloudControlAssessmentDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudControlAssessmentDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudControlAssessmentDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails"; + }; + + return CloudControlAssessmentDetails; + })(); + + v1.SimilarControls = (function() { + + /** + * Properties of a SimilarControls. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ISimilarControls + * @property {string|null} [framework] SimilarControls framework + * @property {string|null} [controlId] SimilarControls controlId + */ + + /** + * Constructs a new SimilarControls. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a SimilarControls. + * @implements ISimilarControls + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls=} [properties] Properties to set + */ + function SimilarControls(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimilarControls framework. + * @member {string} framework + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @instance + */ + SimilarControls.prototype.framework = ""; + + /** + * SimilarControls controlId. + * @member {string} controlId + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @instance + */ + SimilarControls.prototype.controlId = ""; + + /** + * Creates a new SimilarControls instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls instance + */ + SimilarControls.create = function create(properties) { + return new SimilarControls(properties); + }; + + /** + * Encodes the specified SimilarControls message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls} message SimilarControls message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimilarControls.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); + if (message.controlId != null && Object.hasOwnProperty.call(message, "controlId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.controlId); + return writer; + }; + + /** + * Encodes the specified SimilarControls message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls} message SimilarControls message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimilarControls.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimilarControls message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimilarControls.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.framework = reader.string(); + break; + } + case 2: { + message.controlId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimilarControls message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimilarControls.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimilarControls message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimilarControls.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.framework != null && message.hasOwnProperty("framework")) + if (!$util.isString(message.framework)) + return "framework: string expected"; + if (message.controlId != null && message.hasOwnProperty("controlId")) + if (!$util.isString(message.controlId)) + return "controlId: string expected"; + return null; + }; + + /** + * Creates a SimilarControls message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls + */ + SimilarControls.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls(); + if (object.framework != null) + message.framework = String(object.framework); + if (object.controlId != null) + message.controlId = String(object.controlId); + return message; + }; + + /** + * Creates a plain object from a SimilarControls message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.SimilarControls} message SimilarControls + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimilarControls.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.framework = ""; + object.controlId = ""; + } + if (message.framework != null && message.hasOwnProperty("framework")) + object.framework = message.framework; + if (message.controlId != null && message.hasOwnProperty("controlId")) + object.controlId = message.controlId; + return object; + }; + + /** + * Converts this SimilarControls to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @instance + * @returns {Object.} JSON object + */ + SimilarControls.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimilarControls + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimilarControls.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.SimilarControls"; + }; + + return SimilarControls; + })(); + + v1.AggregatedComplianceReport = (function() { + + /** + * Properties of an AggregatedComplianceReport. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IAggregatedComplianceReport + * @property {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null} [controlAssessmentDetails] AggregatedComplianceReport controlAssessmentDetails + * @property {google.protobuf.ITimestamp|null} [reportTime] AggregatedComplianceReport reportTime + */ + + /** + * Constructs a new AggregatedComplianceReport. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents an AggregatedComplianceReport. + * @implements IAggregatedComplianceReport + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport=} [properties] Properties to set + */ + function AggregatedComplianceReport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AggregatedComplianceReport controlAssessmentDetails. + * @member {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null|undefined} controlAssessmentDetails + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @instance + */ + AggregatedComplianceReport.prototype.controlAssessmentDetails = null; + + /** + * AggregatedComplianceReport reportTime. + * @member {google.protobuf.ITimestamp|null|undefined} reportTime + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @instance + */ + AggregatedComplianceReport.prototype.reportTime = null; + + /** + * Creates a new AggregatedComplianceReport instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport instance + */ + AggregatedComplianceReport.create = function create(properties) { + return new AggregatedComplianceReport(properties); + }; + + /** + * Encodes the specified AggregatedComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport} message AggregatedComplianceReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregatedComplianceReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.controlAssessmentDetails != null && Object.hasOwnProperty.call(message, "controlAssessmentDetails")) + $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.encode(message.controlAssessmentDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.reportTime != null && Object.hasOwnProperty.call(message, "reportTime")) + $root.google.protobuf.Timestamp.encode(message.reportTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AggregatedComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport} message AggregatedComplianceReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregatedComplianceReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregatedComplianceReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregatedComplianceReport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.decode(reader, reader.uint32()); + break; + } + case 2: { + message.reportTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AggregatedComplianceReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregatedComplianceReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AggregatedComplianceReport message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregatedComplianceReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify(message.controlAssessmentDetails); + if (error) + return "controlAssessmentDetails." + error; + } + if (message.reportTime != null && message.hasOwnProperty("reportTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.reportTime); + if (error) + return "reportTime." + error; + } + return null; + }; + + /** + * Creates an AggregatedComplianceReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport + */ + AggregatedComplianceReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport(); + if (object.controlAssessmentDetails != null) { + if (typeof object.controlAssessmentDetails !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.controlAssessmentDetails: object expected"); + message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.fromObject(object.controlAssessmentDetails); + } + if (object.reportTime != null) { + if (typeof object.reportTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.reportTime: object expected"); + message.reportTime = $root.google.protobuf.Timestamp.fromObject(object.reportTime); + } + return message; + }; + + /** + * Creates a plain object from an AggregatedComplianceReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} message AggregatedComplianceReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregatedComplianceReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.controlAssessmentDetails = null; + object.reportTime = null; + } + if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) + object.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.toObject(message.controlAssessmentDetails, options); + if (message.reportTime != null && message.hasOwnProperty("reportTime")) + object.reportTime = $root.google.protobuf.Timestamp.toObject(message.reportTime, options); + return object; + }; + + /** + * Converts this AggregatedComplianceReport to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @instance + * @returns {Object.} JSON object + */ + AggregatedComplianceReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregatedComplianceReport + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregatedComplianceReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport"; + }; + + return AggregatedComplianceReport; + })(); + + v1.TargetResourceDetails = (function() { + + /** + * Properties of a TargetResourceDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ITargetResourceDetails + * @property {string|null} [frameworkDeployment] TargetResourceDetails frameworkDeployment + * @property {string|null} [targetResourceDisplayName] TargetResourceDetails targetResourceDisplayName + * @property {string|null} [targetResource] TargetResourceDetails targetResource + * @property {google.protobuf.ITimestamp|null} [createTime] TargetResourceDetails createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] TargetResourceDetails updateTime + * @property {number|Long|null} [majorRevisionId] TargetResourceDetails majorRevisionId + * @property {number|Long|null} [minorRevisionId] TargetResourceDetails minorRevisionId + */ + + /** + * Constructs a new TargetResourceDetails. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a TargetResourceDetails. + * @implements ITargetResourceDetails + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails=} [properties] Properties to set + */ + function TargetResourceDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetResourceDetails frameworkDeployment. + * @member {string} frameworkDeployment + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + */ + TargetResourceDetails.prototype.frameworkDeployment = ""; + + /** + * TargetResourceDetails targetResourceDisplayName. + * @member {string} targetResourceDisplayName + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + */ + TargetResourceDetails.prototype.targetResourceDisplayName = ""; + + /** + * TargetResourceDetails targetResource. + * @member {string} targetResource + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + */ + TargetResourceDetails.prototype.targetResource = ""; + + /** + * TargetResourceDetails createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + */ + TargetResourceDetails.prototype.createTime = null; + + /** + * TargetResourceDetails updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + */ + TargetResourceDetails.prototype.updateTime = null; + + /** + * TargetResourceDetails majorRevisionId. + * @member {number|Long} majorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + */ + TargetResourceDetails.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TargetResourceDetails minorRevisionId. + * @member {number|Long} minorRevisionId + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + */ + TargetResourceDetails.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new TargetResourceDetails instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails instance + */ + TargetResourceDetails.create = function create(properties) { + return new TargetResourceDetails(properties); + }; + + /** + * Encodes the specified TargetResourceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails} message TargetResourceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResourceDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frameworkDeployment != null && Object.hasOwnProperty.call(message, "frameworkDeployment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.frameworkDeployment); + if (message.targetResourceDisplayName != null && Object.hasOwnProperty.call(message, "targetResourceDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetResourceDisplayName); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetResource); + 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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.majorRevisionId); + if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.minorRevisionId); + return writer; + }; + + /** + * Encodes the specified TargetResourceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails} message TargetResourceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResourceDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetResourceDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResourceDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.frameworkDeployment = reader.string(); + break; + } + case 2: { + message.targetResourceDisplayName = reader.string(); + break; + } + case 3: { + message.targetResource = 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: { + message.majorRevisionId = reader.int64(); + break; + } + case 7: { + message.minorRevisionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetResourceDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResourceDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetResourceDetails message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetResourceDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) + if (!$util.isString(message.frameworkDeployment)) + return "frameworkDeployment: string expected"; + if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) + if (!$util.isString(message.targetResourceDisplayName)) + return "targetResourceDisplayName: string expected"; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + if (!$util.isString(message.targetResource)) + return "targetResource: 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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) + return "majorRevisionId: integer|Long expected"; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) + return "minorRevisionId: integer|Long expected"; + return null; + }; + + /** + * Creates a TargetResourceDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails + */ + TargetResourceDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails(); + if (object.frameworkDeployment != null) + message.frameworkDeployment = String(object.frameworkDeployment); + if (object.targetResourceDisplayName != null) + message.targetResourceDisplayName = String(object.targetResourceDisplayName); + if (object.targetResource != null) + message.targetResource = String(object.targetResource); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.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.cloudsecuritycompliance.v1.TargetResourceDetails.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.majorRevisionId != null) + if ($util.Long) + (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; + else if (typeof object.majorRevisionId === "string") + message.majorRevisionId = parseInt(object.majorRevisionId, 10); + else if (typeof object.majorRevisionId === "number") + message.majorRevisionId = object.majorRevisionId; + else if (typeof object.majorRevisionId === "object") + message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); + if (object.minorRevisionId != null) + if ($util.Long) + (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; + else if (typeof object.minorRevisionId === "string") + message.minorRevisionId = parseInt(object.minorRevisionId, 10); + else if (typeof object.minorRevisionId === "number") + message.minorRevisionId = object.minorRevisionId; + else if (typeof object.minorRevisionId === "object") + message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a TargetResourceDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} message TargetResourceDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetResourceDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.frameworkDeployment = ""; + object.targetResourceDisplayName = ""; + object.targetResource = ""; + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.majorRevisionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minorRevisionId = options.longs === String ? "0" : 0; + } + if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) + object.frameworkDeployment = message.frameworkDeployment; + if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) + object.targetResourceDisplayName = message.targetResourceDisplayName; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = message.targetResource; + 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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) + if (typeof message.majorRevisionId === "number") + object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; + else + object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; + if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) + if (typeof message.minorRevisionId === "number") + object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; + else + object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; + return object; + }; + + /** + * Converts this TargetResourceDetails to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @instance + * @returns {Object.} JSON object + */ + TargetResourceDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetResourceDetails + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResourceDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails"; + }; + + return TargetResourceDetails; + })(); + + v1.Trend = (function() { + + /** + * Properties of a Trend. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ITrend + * @property {google.protobuf.IDuration|null} [duration] Trend duration + * @property {number|null} [valuePercent] Trend valuePercent + */ + + /** + * Constructs a new Trend. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Trend. + * @implements ITrend + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend=} [properties] Properties to set + */ + function Trend(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trend duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @instance + */ + Trend.prototype.duration = null; + + /** + * Trend valuePercent. + * @member {number} valuePercent + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @instance + */ + Trend.prototype.valuePercent = 0; + + /** + * Creates a new Trend instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend instance + */ + Trend.create = function create(properties) { + return new Trend(properties); + }; + + /** + * Encodes the specified Trend message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend} message Trend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.valuePercent != null && Object.hasOwnProperty.call(message, "valuePercent")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.valuePercent); + return writer; + }; + + /** + * Encodes the specified Trend message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend} message Trend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trend message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trend.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Trend(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.valuePercent = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trend message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.valuePercent != null && message.hasOwnProperty("valuePercent")) + if (typeof message.valuePercent !== "number") + return "valuePercent: number expected"; + return null; + }; + + /** + * Creates a Trend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend + */ + Trend.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Trend) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Trend(); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Trend.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.valuePercent != null) + message.valuePercent = Number(object.valuePercent); + return message; + }; + + /** + * Creates a plain object from a Trend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Trend} message Trend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.duration = null; + object.valuePercent = 0; + } + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.valuePercent != null && message.hasOwnProperty("valuePercent")) + object.valuePercent = options.json && !isFinite(message.valuePercent) ? String(message.valuePercent) : message.valuePercent; + return object; + }; + + /** + * Converts this Trend to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @instance + * @returns {Object.} JSON object + */ + Trend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trend + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Trend"; + }; + + return Trend; + })(); + + return v1; + })(); + + return cloudsecuritycompliance; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + 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.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + 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.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + 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.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.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.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * 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 + * @property {number} IDENTIFIER=8 IDENTIFIER 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; + values[valuesById[8] = "IDENTIFIER"] = 8; + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + 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); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * 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 = []; + this.declaration = []; + if (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; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * 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.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + 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 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + 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; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + 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]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + 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.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @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 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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * 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.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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + 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 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 50: { + message.features = $root.google.protobuf.FeatureSet.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; + } + 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.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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @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 deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + 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 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.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; + } + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @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.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * 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.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + 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) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.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; + } + 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.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + 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) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + 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.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.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; + } + } + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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 (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @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 deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.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; + } + } + 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + 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; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @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 + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * 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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * 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"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + 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"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; + } + case 525000001: { + message[".google.api.apiVersion"] = 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + 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.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @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 features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * 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.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.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; + } + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + 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) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + 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.features = null; + 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] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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 >= 0) + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + 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(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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); + }; + + /** + * 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; + })(); + + return rpc; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.type + * @interface IInterval + * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Interval endTime + */ + + /** + * Constructs a new Interval. + * @memberof google.type + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.type.IInterval=} [properties] Properties to set + */ + function Interval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.startTime = null; + + /** + * Interval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.endTime = null; + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval=} [properties] Properties to set + * @returns {google.type.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encode + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, 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(); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.type.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.type.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Interval) + return object; + var message = new $root.google.type.Interval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.type.Interval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.type.Interval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Interval + * @static + * @param {google.type.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.type.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.type.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Interval"; + }; + + return Interval; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json new file mode 100644 index 00000000000..a18874f53aa --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json @@ -0,0 +1,5937 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "cloudsecuritycompliance": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.CloudSecurityCompliance.V1", + "go_package": "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb", + "java_multiple_files": true, + "java_outer_classname": "MonitoringProto", + "java_package": "com.google.cloud.cloudsecuritycompliance.v1", + "php_namespace": "Google\\Cloud\\CloudSecurityCompliance\\V1", + "ruby_package": "Google::Cloud::CloudSecurityCompliance::V1", + "(google.api.resource_definition).type": "cloudsecuritycompliance.googleapis.com/FolderLocation", + "(google.api.resource_definition).pattern": "folders/{folder}/locations/{location}" + }, + "nested": { + "Audit": { + "options": { + "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GenerateFrameworkAuditScopeReport": { + "requestType": "GenerateFrameworkAuditScopeReportRequest", + "responseType": "GenerateFrameworkAuditScopeReportResponse", + "options": { + "(google.api.http).post": "/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "scope,report_format,compliance_framework" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + "body": "*", + "additional_bindings": [ + { + "post": "/v1/{scope=projects/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + "body": "*" + }, + { + "post": "/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "scope,report_format,compliance_framework" + } + ] + }, + "CreateFrameworkAudit": { + "requestType": "CreateFrameworkAuditRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", + "(google.api.http).body": "framework_audit", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworkAudits", + "(google.api.http).additional_bindings.body": "framework_audit", + "(google.api.method_signature)": "parent,framework_audit,framework_audit_id", + "(google.longrunning.operation_info).response_type": "FrameworkAudit", + "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", + "body": "framework_audit", + "additional_bindings": [ + { + "post": "/v1/{parent=folders/*/locations/*}/frameworkAudits", + "body": "framework_audit" + }, + { + "post": "/v1/{parent=projects/*/locations/*}/frameworkAudits", + "body": "framework_audit" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,framework_audit,framework_audit_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "FrameworkAudit", + "metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + } + } + ] + }, + "ListFrameworkAudits": { + "requestType": "ListFrameworkAuditsRequest", + "responseType": "ListFrameworkAuditsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworkAudits", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/frameworkAudits" + }, + { + "get": "/v1/{parent=projects/*/locations/*}/frameworkAudits" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFrameworkAudit": { + "requestType": "GetFrameworkAuditRequest", + "responseType": "FrameworkAudit", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkAudits/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkAudits/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/frameworkAudits/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/frameworkAudits/*}" + }, + { + "get": "/v1/{name=projects/*/locations/*/frameworkAudits/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ComplianceState": { + "values": { + "COMPLIANCE_STATE_UNSPECIFIED": 0, + "COMPLIANT": 1, + "VIOLATION": 2, + "MANUAL_REVIEW_NEEDED": 3, + "ERROR": 4, + "AUDIT_NOT_SUPPORTED": 5 + } + }, + "GenerateFrameworkAuditScopeReportRequest": { + "fields": { + "scope": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "reportFormat": { + "type": "Format", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "complianceFramework": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "ODF": 1 + } + } + } + }, + "GenerateFrameworkAuditScopeReportResponse": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/GenerateFrameworkAuditScopeReportResponse", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}", + "(google.api.resource).plural": "frameworkAuditScopeReports", + "(google.api.resource).singular": "generateFrameworkAuditScopeReportResponse" + }, + "oneofs": { + "auditReport": { + "oneof": [ + "scopeReportContents" + ] + } + }, + "fields": { + "scopeReportContents": { + "type": "bytes", + "id": 3 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "complianceFramework": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ReportSummary": { + "fields": { + "totalCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compliantCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "violationCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "manualReviewNeededCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateFrameworkAuditRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + }, + "frameworkAuditId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "frameworkAudit": { + "type": "FrameworkAudit", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FrameworkAuditDestination": { + "oneofs": { + "destinationType": { + "oneof": [ + "bucket" + ] + } + }, + "fields": { + "bucket": { + "type": "BucketDestination", + "id": 1 + } + } + }, + "BucketDestination": { + "fields": { + "bucketUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "frameworkAuditFormat": { + "type": "Format", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "ODF": 1 + } + } + } + }, + "FrameworkAudit": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}", + "(google.api.resource).plural": "frameworkAudits", + "(google.api.resource).singular": "frameworkAudit" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "frameworkAuditId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "complianceFramework": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "scope": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "frameworkAuditDestination": { + "type": "FrameworkAuditDestination", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "complianceState": { + "type": "ComplianceState", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reportSummary": { + "type": "ReportSummary", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudControlGroupAuditDetails": { + "rule": "repeated", + "type": "CloudControlGroupAuditDetails", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudControlAuditDetails": { + "rule": "repeated", + "type": "CloudControlAuditDetails", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "operationId": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "RUNNING": 2, + "UPLOADING": 3, + "FAILED": 4, + "SUCCEEDED": 5 + } + } + } + }, + "ListFrameworkAuditsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + }, + "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" + } + } + } + }, + "ListFrameworkAuditsResponse": { + "fields": { + "frameworkAudits": { + "rule": "repeated", + "type": "FrameworkAudit", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetFrameworkAuditRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit" + } + } + } + }, + "CloudControlGroupAuditDetails": { + "fields": { + "cloudControlGroupId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "responsibilityType": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "googleResponsibilityDescription": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "googleResponsibilityImplementation": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerResponsibilityDescription": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerResponsibilityImplementation": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "complianceState": { + "type": "ComplianceState", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlId": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlFamily": { + "type": "ControlFamily", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudControlDetails": { + "rule": "repeated", + "type": "CloudControlAuditDetails", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reportSummary": { + "type": "ReportSummary", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "FindingDetails": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "complianceState": { + "type": "ComplianceState", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "observation": { + "type": "ObservationDetails", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "evidence": { + "type": "EvidenceDetails", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ObservationDetails": { + "fields": { + "currentValue": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expectedValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "guidance": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "EvidenceDetails": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "service": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "evidencePath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CloudControlAuditDetails": { + "fields": { + "cloudControl": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudControlId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudControlDescription": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "complianceState": { + "type": "ComplianceState", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reportSummary": { + "type": "ReportSummary", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "findings": { + "rule": "repeated", + "type": "FindingDetails", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RegulatoryControlResponsibilityType": { + "values": { + "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED": 0, + "GOOGLE": 1, + "CUSTOMER": 2, + "SHARED": 3 + } + }, + "EnforcementMode": { + "values": { + "ENFORCEMENT_MODE_UNSPECIFIED": 0, + "PREVENTIVE": 1, + "DETECTIVE": 2, + "AUDIT": 3 + } + }, + "FrameworkCategory": { + "values": { + "FRAMEWORK_CATEGORY_UNSPECIFIED": 0, + "INDUSTRY_DEFINED_STANDARD": 1, + "ASSURED_WORKLOADS": 2, + "DATA_SECURITY": 3, + "GOOGLE_BEST_PRACTICES": 4, + "CUSTOM_FRAMEWORK": 5 + } + }, + "CloudControlCategory": { + "values": { + "CLOUD_CONTROL_CATEGORY_UNSPECIFIED": 0, + "CC_CATEGORY_INFRASTRUCTURE": 1, + "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE": 2, + "CC_CATEGORY_PHYSICAL_SECURITY": 3, + "CC_CATEGORY_DATA_SECURITY": 4, + "CC_CATEGORY_NETWORK_SECURITY": 5, + "CC_CATEGORY_INCIDENT_MANAGEMENT": 6, + "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT": 7, + "CC_CATEGORY_ENCRYPTION": 8, + "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE": 9, + "CC_CATEGORY_HR_ADMIN_AND_PROCESSES": 10, + "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT": 11, + "CC_CATEGORY_LEGAL_AND_DISCLOSURES": 12, + "CC_CATEGORY_VULNERABILITY_MANAGEMENT": 13, + "CC_CATEGORY_PRIVACY": 14, + "CC_CATEGORY_BCDR": 15, + "CC_CATEGORY_ADMIN_ACCESS": 16, + "CC_CATEGORY_DATA_RESIDENCY": 17, + "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION": 18, + "CC_CATEGORY_SERVICE_SPECIFIC": 19 + } + }, + "CloudProvider": { + "values": { + "CLOUD_PROVIDER_UNSPECIFIED": 0, + "AWS": 1, + "AZURE": 2, + "GCP": 3 + } + }, + "Severity": { + "values": { + "SEVERITY_UNSPECIFIED": 0, + "CRITICAL": 1, + "HIGH": 2, + "MEDIUM": 3, + "LOW": 4 + } + }, + "RuleActionType": { + "values": { + "RULE_ACTION_TYPE_UNSPECIFIED": 0, + "RULE_ACTION_TYPE_PREVENTIVE": 1, + "RULE_ACTION_TYPE_DETECTIVE": 2, + "RULE_ACTION_TYPE_AUDIT": 3 + } + }, + "TargetResourceType": { + "values": { + "TARGET_RESOURCE_TYPE_UNSPECIFIED": 0, + "TARGET_RESOURCE_CRM_TYPE_ORG": 1, + "TARGET_RESOURCE_CRM_TYPE_FOLDER": 2, + "TARGET_RESOURCE_CRM_TYPE_PROJECT": 3, + "TARGET_RESOURCE_TYPE_APPLICATION": 4 + } + }, + "Framework": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/Framework", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/frameworks/{framework}", + "(google.api.resource).plural": "frameworks", + "(google.api.resource).singular": "framework" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "FrameworkType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudControlDetails": { + "rule": "repeated", + "type": "CloudControlDetails", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "category": { + "rule": "repeated", + "type": "FrameworkCategory", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "supportedCloudProviders": { + "rule": "repeated", + "type": "CloudProvider", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "supportedTargetResourceTypes": { + "rule": "repeated", + "type": "TargetResourceType", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "supportedEnforcementModes": { + "rule": "repeated", + "type": "EnforcementMode", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "FrameworkType": { + "values": { + "FRAMEWORK_TYPE_UNSPECIFIED": 0, + "BUILT_IN": 1, + "CUSTOM": 2 + } + } + } + }, + "CloudControlDetails": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parameters": { + "rule": "repeated", + "type": "Parameter", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FrameworkReference": { + "oneofs": { + "_majorRevisionId": { + "oneof": [ + "majorRevisionId" + ] + } + }, + "fields": { + "framework": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/Framework" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Parameter": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parameterValue": { + "type": "ParamValue", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CloudControl": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CloudControl", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/cloudControls/{cloud_control}", + "(google.api.resource).plural": "cloudControls", + "(google.api.resource).singular": "cloudControl" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "supportedEnforcementModes": { + "rule": "repeated", + "type": "EnforcementMode", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "parameterSpec": { + "rule": "repeated", + "type": "ParameterSpec", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rules": { + "rule": "repeated", + "type": "Rule", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "severity": { + "type": "Severity", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "findingCategory": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "supportedCloudProviders": { + "rule": "repeated", + "type": "CloudProvider", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "relatedFrameworks": { + "rule": "repeated", + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "remediationSteps": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "categories": { + "rule": "repeated", + "type": "CloudControlCategory", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "supportedTargetResourceTypes": { + "rule": "repeated", + "type": "TargetResourceType", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CUSTOM": 1, + "BUILT_IN": 2 + } + } + } + }, + "ParameterSpec": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "isRequired": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "valueType": { + "type": "ValueType", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultValue": { + "type": "ParamValue", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "substitutionRules": { + "rule": "repeated", + "type": "ParameterSubstitutionRule", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subParameters": { + "rule": "repeated", + "type": "ParameterSpec", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validation": { + "type": "Validation", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "STRING": 3, + "BOOLEAN": 4, + "STRINGLIST": 5, + "NUMBER": 6, + "ONEOF": 7 + } + } + } + }, + "Validation": { + "oneofs": { + "constraint": { + "oneof": [ + "allowedValues", + "intRange", + "regexpPattern" + ] + } + }, + "fields": { + "allowedValues": { + "type": "AllowedValues", + "id": 1 + }, + "intRange": { + "type": "IntRange", + "id": 2 + }, + "regexpPattern": { + "type": "RegexpPattern", + "id": 3 + } + } + }, + "AllowedValues": { + "fields": { + "values": { + "rule": "repeated", + "type": "ParamValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RegexpPattern": { + "fields": { + "pattern": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "IntRange": { + "fields": { + "min": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "max": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StringList": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ParamValue": { + "oneofs": { + "kind": { + "oneof": [ + "stringValue", + "boolValue", + "stringListValue", + "numberValue", + "oneofValue" + ] + } + }, + "fields": { + "stringValue": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "boolValue": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "stringListValue": { + "type": "StringList", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "numberValue": { + "type": "double", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oneofValue": { + "type": "Parameter", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ParameterSubstitutionRule": { + "oneofs": { + "substitutionType": { + "oneof": [ + "placeholderSubstitutionRule", + "attributeSubstitutionRule" + ] + } + }, + "fields": { + "placeholderSubstitutionRule": { + "type": "PlaceholderSubstitutionRule", + "id": 1 + }, + "attributeSubstitutionRule": { + "type": "AttributeSubstitutionRule", + "id": 2 + } + } + }, + "AttributeSubstitutionRule": { + "fields": { + "attribute": { + "type": "string", + "id": 1 + } + } + }, + "PlaceholderSubstitutionRule": { + "fields": { + "attribute": { + "type": "string", + "id": 1 + } + } + }, + "Rule": { + "oneofs": { + "implementation": { + "oneof": [ + "celExpression" + ] + } + }, + "fields": { + "celExpression": { + "type": "CELExpression", + "id": 1 + }, + "description": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ruleActionTypes": { + "rule": "repeated", + "type": "RuleActionType", + "id": 16, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CELExpression": { + "oneofs": { + "criteria": { + "oneof": [ + "resourceTypesValues" + ] + } + }, + "fields": { + "resourceTypesValues": { + "type": "StringList", + "id": 3 + }, + "expression": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "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" + } + } + } + }, + "Control": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/Control", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/controls/{control}", + "(google.api.resource).plural": "controls", + "(google.api.resource).singular": "control" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "family": { + "type": "Family", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlFamily": { + "type": "ControlFamily", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "responsibilityType": { + "type": "RegulatoryControlResponsibilityType", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "googleResponsibilityDescription": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "googleResponsibilityImplementation": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerResponsibilityDescription": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerResponsibilityImplementation": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sharedResponsibilityDescription": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "additionalContentUri": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "relatedFrameworks": { + "rule": "repeated", + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Family": { + "values": { + "FAMILY_UNSPECIFIED": 0, + "AC": 1, + "AT": 2, + "AU": 3, + "CA": 4, + "CM": 5, + "CP": 6, + "IA": 7, + "IR": 8, + "MA": 9, + "MP": 10, + "PE": 11, + "PL": 12, + "PS": 13, + "RA": 14, + "SA": 15, + "SC": 16, + "SI": 17, + "SR": 18 + } + } + } + }, + "ControlFamily": { + "fields": { + "familyId": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "CmEnrollmentService": { + "options": { + "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "UpdateCmEnrollment": { + "requestType": "UpdateCmEnrollmentRequest", + "responseType": "CmEnrollment", + "options": { + "(google.api.http).patch": "/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}", + "(google.api.http).body": "cm_enrollment", + "(google.api.http).additional_bindings.patch": "/v1/{cm_enrollment.name=projects/*/locations/*/cmEnrollment}", + "(google.api.http).additional_bindings.body": "cm_enrollment", + "(google.api.method_signature)": "cm_enrollment,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}", + "body": "cm_enrollment", + "additional_bindings": [ + { + "patch": "/v1/{cm_enrollment.name=folders/*/locations/*/cmEnrollment}", + "body": "cm_enrollment" + }, + { + "patch": "/v1/{cm_enrollment.name=projects/*/locations/*/cmEnrollment}", + "body": "cm_enrollment" + } + ] + } + }, + { + "(google.api.method_signature)": "cm_enrollment,update_mask" + } + ] + }, + "CalculateEffectiveCmEnrollment": { + "requestType": "CalculateEffectiveCmEnrollmentRequest", + "responseType": "CalculateEffectiveCmEnrollmentResponse", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cmEnrollment}:calculate", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/cmEnrollment}:calculate" + }, + { + "get": "/v1/{name=projects/*/locations/*/cmEnrollment}:calculate" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "UpdateCmEnrollmentRequest": { + "fields": { + "cmEnrollment": { + "type": "CmEnrollment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CalculateEffectiveCmEnrollmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CmEnrollment" + } + } + } + }, + "CmEnrollment": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CmEnrollment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/cmEnrollment", + "(google.api.resource).plural": "cmEnrollments", + "(google.api.resource).singular": "cmEnrollment" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "enrolled": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "auditConfig": { + "type": "AuditConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CalculateEffectiveCmEnrollmentResponse": { + "fields": { + "cmEnrollment": { + "type": "CmEnrollment", + "id": 1 + } + } + }, + "AuditConfig": { + "fields": { + "destinations": { + "rule": "repeated", + "type": "CmEligibleDestination", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "CmEligibleDestination": { + "oneofs": { + "cmEligibleDestinations": { + "oneof": [ + "gcsBucket" + ] + } + }, + "fields": { + "gcsBucket": { + "type": "string", + "id": 1 + } + } + } + } + }, + "Config": { + "options": { + "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListFrameworks": { + "requestType": "ListFrameworksRequest", + "responseType": "ListFrameworksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworks", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/frameworks", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/frameworks" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFramework": { + "requestType": "GetFrameworkRequest", + "responseType": "Framework", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/frameworks/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateFramework": { + "requestType": "CreateFrameworkRequest", + "responseType": "Framework", + "options": { + "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworks", + "(google.api.http).body": "framework", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworks", + "(google.api.http).additional_bindings.body": "framework", + "(google.api.method_signature)": "parent,framework,framework_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=organizations/*/locations/*}/frameworks", + "body": "framework", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/frameworks", + "body": "framework" + } + } + }, + { + "(google.api.method_signature)": "parent,framework,framework_id" + } + ] + }, + "UpdateFramework": { + "requestType": "UpdateFrameworkRequest", + "responseType": "Framework", + "options": { + "(google.api.http).patch": "/v1/{framework.name=organizations/*/locations/*/frameworks/*}", + "(google.api.http).body": "framework", + "(google.api.http).additional_bindings.patch": "/v1/{framework.name=projects/*/locations/*/frameworks/*}", + "(google.api.http).additional_bindings.body": "framework", + "(google.api.method_signature)": "framework,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{framework.name=organizations/*/locations/*/frameworks/*}", + "body": "framework", + "additional_bindings": { + "patch": "/v1/{framework.name=projects/*/locations/*/frameworks/*}", + "body": "framework" + } + } + }, + { + "(google.api.method_signature)": "framework,update_mask" + } + ] + }, + "DeleteFramework": { + "requestType": "DeleteFrameworkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/frameworks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/frameworks/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCloudControls": { + "requestType": "ListCloudControlsRequest", + "responseType": "ListCloudControlsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/cloudControls", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/cloudControls", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/cloudControls", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/cloudControls" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCloudControl": { + "requestType": "GetCloudControlRequest", + "responseType": "CloudControl", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cloudControls/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/cloudControls/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCloudControl": { + "requestType": "CreateCloudControlRequest", + "responseType": "CloudControl", + "options": { + "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/cloudControls", + "(google.api.http).body": "cloud_control", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/cloudControls", + "(google.api.http).additional_bindings.body": "cloud_control", + "(google.api.method_signature)": "parent,cloud_control,cloud_control_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=organizations/*/locations/*}/cloudControls", + "body": "cloud_control", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/cloudControls", + "body": "cloud_control" + } + } + }, + { + "(google.api.method_signature)": "parent,cloud_control,cloud_control_id" + } + ] + }, + "UpdateCloudControl": { + "requestType": "UpdateCloudControlRequest", + "responseType": "CloudControl", + "options": { + "(google.api.http).patch": "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}", + "(google.api.http).body": "cloud_control", + "(google.api.http).additional_bindings.patch": "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}", + "(google.api.http).additional_bindings.body": "cloud_control", + "(google.api.method_signature)": "cloud_control,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}", + "body": "cloud_control", + "additional_bindings": { + "patch": "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}", + "body": "cloud_control" + } + } + }, + { + "(google.api.method_signature)": "cloud_control,update_mask" + } + ] + }, + "DeleteCloudControl": { + "requestType": "DeleteCloudControlRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/cloudControls/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/cloudControls/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ListFrameworksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/Framework" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFrameworksResponse": { + "fields": { + "frameworks": { + "rule": "repeated", + "type": "Framework", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetFrameworkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/Framework" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateFrameworkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/Framework" + } + }, + "frameworkId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "framework": { + "type": "Framework", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateFrameworkRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "framework": { + "type": "Framework", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteFrameworkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/Framework" + } + } + } + }, + "ListCloudControlsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/CloudControl" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCloudControlsResponse": { + "fields": { + "cloudControls": { + "rule": "repeated", + "type": "CloudControl", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetCloudControlRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControl" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateCloudControlRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/CloudControl" + } + }, + "cloudControlId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "cloudControl": { + "type": "CloudControl", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateCloudControlRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudControl": { + "type": "CloudControl", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteCloudControlRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControl" + } + } + } + }, + "Deployment": { + "options": { + "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateFrameworkDeployment": { + "requestType": "CreateFrameworkDeploymentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", + "(google.api.http).body": "framework_deployment", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", + "(google.api.http).additional_bindings.body": "framework_deployment", + "(google.api.method_signature)": "parent,framework_deployment,framework_deployment_id", + "(google.longrunning.operation_info).response_type": "FrameworkDeployment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", + "body": "framework_deployment", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", + "body": "framework_deployment" + } + } + }, + { + "(google.api.method_signature)": "parent,framework_deployment,framework_deployment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "FrameworkDeployment", + "metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + } + } + ] + }, + "DeleteFrameworkDeployment": { + "requestType": "DeleteFrameworkDeploymentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" + } + } + ] + }, + "GetFrameworkDeployment": { + "requestType": "GetFrameworkDeploymentRequest", + "responseType": "FrameworkDeployment", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListFrameworkDeployments": { + "requestType": "ListFrameworkDeploymentsRequest", + "responseType": "ListFrameworkDeploymentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/frameworkDeployments" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCloudControlDeployment": { + "requestType": "GetCloudControlDeploymentRequest", + "responseType": "CloudControlDeployment", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCloudControlDeployments": { + "requestType": "ListCloudControlDeploymentsRequest", + "responseType": "ListCloudControlDeploymentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/cloudControlDeployments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/cloudControlDeployments" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "DeploymentState": { + "values": { + "DEPLOYMENT_STATE_UNSPECIFIED": 0, + "DEPLOYMENT_STATE_VALIDATING": 1, + "DEPLOYMENT_STATE_CREATING": 2, + "DEPLOYMENT_STATE_DELETING": 3, + "DEPLOYMENT_STATE_UPDATING": 8, + "DEPLOYMENT_STATE_FAILED": 4, + "DEPLOYMENT_STATE_READY": 5, + "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED": 6, + "DEPLOYMENT_STATE_PARTIALLY_DELETED": 7 + } + }, + "FrameworkDeployment": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}", + "(google.api.resource).plural": "frameworkDeployments", + "(google.api.resource).singular": "frameworkDeployment" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "targetResourceConfig": { + "type": "TargetResourceConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "computedTargetResource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "framework": { + "type": "FrameworkReference", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudControlMetadata": { + "rule": "repeated", + "type": "CloudControlMetadata", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deploymentState": { + "type": "DeploymentState", + "id": 7, + "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" + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "targetResourceDisplayName": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudControlDeploymentReferences": { + "rule": "repeated", + "type": "CloudControlDeploymentReference", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CloudControlDeployment": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}", + "(google.api.resource).plural": "cloudControlDeployments", + "(google.api.resource).singular": "cloudControlDeployment" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "targetResourceConfig": { + "type": "TargetResourceConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "targetResource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudControlMetadata": { + "type": "CloudControlMetadata", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deploymentState": { + "type": "DeploymentState", + "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" + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "parameterSubstitutedCloudControl": { + "type": "CloudControl", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "frameworkDeploymentReferences": { + "rule": "repeated", + "type": "FrameworkDeploymentReference", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetResourceDisplayName": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "TargetResourceConfig": { + "oneofs": { + "resourceConfig": { + "oneof": [ + "existingTargetResource", + "targetResourceCreationConfig" + ] + } + }, + "fields": { + "existingTargetResource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "targetResourceCreationConfig": { + "type": "TargetResourceCreationConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TargetResourceCreationConfig": { + "oneofs": { + "resourceCreationConfig": { + "oneof": [ + "folderCreationConfig", + "projectCreationConfig" + ] + } + }, + "fields": { + "folderCreationConfig": { + "type": "FolderCreationConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "projectCreationConfig": { + "type": "ProjectCreationConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FolderCreationConfig": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "folderDisplayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ProjectCreationConfig": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "projectDisplayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "billingAccountId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CloudControlMetadata": { + "fields": { + "cloudControlDetails": { + "type": "CloudControlDetails", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "enforcementMode": { + "type": "EnforcementMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateFrameworkDeploymentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + }, + "frameworkDeploymentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "frameworkDeployment": { + "type": "FrameworkDeployment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteFrameworkDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetFrameworkDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + } + } + }, + "ListFrameworkDeploymentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + }, + "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" + } + } + } + }, + "ListFrameworkDeploymentsResponse": { + "fields": { + "frameworkDeployments": { + "rule": "repeated", + "type": "FrameworkDeployment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetCloudControlDeploymentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" + } + } + } + }, + "ListCloudControlDeploymentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" + } + }, + "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" + } + } + } + }, + "ListCloudControlDeploymentsResponse": { + "fields": { + "cloudControlDeployments": { + "rule": "repeated", + "type": "CloudControlDeployment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CloudControlDeploymentReference": { + "fields": { + "cloudControlDeployment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" + } + } + } + }, + "FrameworkDeploymentReference": { + "fields": { + "frameworkDeployment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" + } + }, + "frameworkReference": { + "type": "FrameworkReference", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "frameworkDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Monitoring": { + "options": { + "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListFrameworkComplianceSummaries": { + "requestType": "ListFrameworkComplianceSummariesRequest", + "responseType": "ListFrameworkComplianceSummariesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummaries", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummaries", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/frameworkComplianceSummaries" + }, + { + "get": "/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListFindingSummaries": { + "requestType": "ListFindingSummariesRequest", + "responseType": "ListFindingSummariesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/findingSummaries", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/findingSummaries", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*}/findingSummaries", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/findingSummaries" + }, + { + "get": "/v1/{parent=projects/*/locations/*}/findingSummaries" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchFrameworkComplianceReport": { + "requestType": "FetchFrameworkComplianceReportRequest", + "responseType": "FrameworkComplianceReport", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetch", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetch", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetch" + }, + { + "get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListControlComplianceSummaries": { + "requestType": "ListControlComplianceSummariesRequest", + "responseType": "ListControlComplianceSummariesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + }, + { + "get": "/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "AggregateFrameworkComplianceReport": { + "requestType": "AggregateFrameworkComplianceReportRequest", + "responseType": "AggregateFrameworkComplianceReportResponse", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregate", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregate", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregate" + }, + { + "get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "EvaluationState": { + "values": { + "EVALUATION_STATE_UNSPECIFIED": 0, + "EVALUATION_STATE_PASSED": 1, + "EVALUATION_STATE_FAILED": 2, + "EVALUATION_STATE_NOT_ASSESSED": 3 + } + }, + "FindingClass": { + "values": { + "FINDING_CLASS_UNSPECIFIED": 0, + "THREAT": 1, + "VULNERABILITY": 2, + "MISCONFIGURATION": 3, + "OBSERVATION": 4, + "SCC_ERROR": 5, + "POSTURE_VIOLATION": 6, + "TOXIC_COMBINATION": 7, + "SENSITIVE_DATA_RISK": 8, + "CHOKEPOINT": 9 + } + }, + "FrameworkComplianceSummaryView": { + "values": { + "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED": 0, + "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC": 1, + "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL": 2 + } + }, + "ListFrameworkComplianceSummariesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" + } + }, + "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" + } + }, + "view": { + "type": "FrameworkComplianceSummaryView", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFrameworkComplianceSummariesResponse": { + "fields": { + "frameworkComplianceSummaries": { + "rule": "repeated", + "type": "FrameworkComplianceSummary", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "FrameworkComplianceReport": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}", + "(google.api.resource).plural": "frameworkComplianceReports", + "(google.api.resource).singular": "frameworkComplianceReport" + }, + "fields": { + "framework": { + "type": "string", + "id": 1 + }, + "frameworkDescription": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlAssessmentDetails": { + "type": "ControlAssessmentDetails", + "id": 4 + }, + "frameworkType": { + "type": "Framework.FrameworkType", + "id": 5 + }, + "supportedCloudProviders": { + "rule": "repeated", + "type": "CloudProvider", + "id": 6 + }, + "frameworkCategories": { + "rule": "repeated", + "type": "FrameworkCategory", + "id": 7 + }, + "frameworkDisplayName": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 10 + }, + "minorRevisionId": { + "type": "int64", + "id": 11 + }, + "targetResourceDetails": { + "rule": "repeated", + "type": "TargetResourceDetails", + "id": 12 + } + } + }, + "FetchFrameworkComplianceReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFindingSummariesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FindingSummary" + } + }, + "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" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFindingSummariesResponse": { + "fields": { + "findingSummaries": { + "rule": "repeated", + "type": "FindingSummary", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListControlComplianceSummariesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListControlComplianceSummariesResponse": { + "fields": { + "controlComplianceSummaries": { + "rule": "repeated", + "type": "ControlComplianceSummary", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "AggregateFrameworkComplianceReportRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" + } + }, + "interval": { + "type": "google.type.Interval", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AggregateFrameworkComplianceReportResponse": { + "fields": { + "aggregatedComplianceReports": { + "rule": "repeated", + "type": "AggregatedComplianceReport", + "id": 1 + } + } + }, + "ControlAssessmentDetails": { + "fields": { + "passingControls": { + "type": "int32", + "id": 1 + }, + "failingControls": { + "type": "int32", + "id": 2 + }, + "assessedPassingControls": { + "type": "int32", + "id": 3 + }, + "notAssessedControls": { + "type": "int32", + "id": 4 + } + } + }, + "FrameworkComplianceSummary": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}", + "(google.api.resource).plural": "frameworkComplianceSummaries", + "(google.api.resource).singular": "frameworkComplianceSummary" + }, + "fields": { + "framework": { + "type": "string", + "id": 1 + }, + "controlAssessmentDetails": { + "type": "ControlAssessmentDetails", + "id": 2 + }, + "frameworkType": { + "type": "Framework.FrameworkType", + "id": 3 + }, + "supportedCloudProviders": { + "rule": "repeated", + "type": "CloudProvider", + "id": 4 + }, + "frameworkCategories": { + "rule": "repeated", + "type": "FrameworkCategory", + "id": 5 + }, + "frameworkDisplayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "majorRevisionId": { + "type": "int64", + "id": 8 + }, + "minorRevisionId": { + "type": "int64", + "id": 9 + }, + "targetResourceDetails": { + "rule": "repeated", + "type": "TargetResourceDetails", + "id": 10 + }, + "findingCount": { + "type": "int64", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlsPassingTrend": { + "type": "Trend", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "FindingSummary": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FindingSummary", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}", + "(google.api.resource).plural": "findingSummaries", + "(google.api.resource).singular": "findingSummary" + }, + "fields": { + "findingCategory": { + "type": "string", + "id": 1 + }, + "findingClass": { + "type": "FindingClass", + "id": 2 + }, + "severity": { + "type": "Severity", + "id": 3 + }, + "findingCount": { + "type": "int64", + "id": 4 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "relatedFrameworks": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + } + } + }, + "ControlComplianceSummary": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}", + "(google.api.resource).plural": "controlComplianceSummaries", + "(google.api.resource).singular": "controlComplianceSummary" + }, + "fields": { + "control": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "overallEvaluationState": { + "type": "EvaluationState", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalFindingsCount": { + "type": "int32", + "id": 5 + }, + "complianceFrameworks": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "similarControls": { + "rule": "repeated", + "type": "SimilarControls", + "id": 7 + }, + "cloudControlReports": { + "rule": "repeated", + "type": "CloudControlReport", + "id": 8 + }, + "controlResponsibilityType": { + "type": "RegulatoryControlResponsibilityType", + "id": 9 + }, + "isFakeControl": { + "type": "bool", + "id": 10 + }, + "name": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + } + } + }, + "CloudControlReport": { + "oneofs": { + "assessmentDetails": { + "oneof": [ + "manualCloudControlAssessmentDetails", + "cloudControlAssessmentDetails" + ] + } + }, + "fields": { + "manualCloudControlAssessmentDetails": { + "type": "ManualCloudControlAssessmentDetails", + "id": 13 + }, + "cloudControlAssessmentDetails": { + "type": "CloudControlAssessmentDetails", + "id": 14 + }, + "cloudControl": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "categories": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "similarControls": { + "rule": "repeated", + "type": "SimilarControls", + "id": 9 + }, + "cloudControlType": { + "type": "CloudControl.Type", + "id": 10 + }, + "findingCategory": { + "type": "string", + "id": 11 + }, + "rules": { + "rule": "repeated", + "type": "Rule", + "id": 12 + }, + "findingSeverity": { + "type": "Severity", + "id": 15 + }, + "enforcementMode": { + "type": "EnforcementMode", + "id": 16 + }, + "cloudControlDeployment": { + "type": "string", + "id": 17 + }, + "majorRevisionId": { + "type": "int64", + "id": 18 + }, + "minorRevisionId": { + "type": "int64", + "id": 19 + }, + "frameworkMajorRevisionIds": { + "rule": "repeated", + "type": "int64", + "id": 20 + } + } + }, + "ManualCloudControlAssessmentDetails": { + "fields": { + "manualCloudControlGuide": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "CloudControlAssessmentDetails": { + "fields": { + "findingsCount": { + "type": "int32", + "id": 1 + }, + "evaluationState": { + "type": "EvaluationState", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "SimilarControls": { + "fields": { + "framework": { + "type": "string", + "id": 1 + }, + "controlId": { + "type": "string", + "id": 2 + } + } + }, + "AggregatedComplianceReport": { + "fields": { + "controlAssessmentDetails": { + "type": "ControlAssessmentDetails", + "id": 1 + }, + "reportTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "TargetResourceDetails": { + "fields": { + "frameworkDeployment": { + "type": "string", + "id": 1 + }, + "targetResourceDisplayName": { + "type": "string", + "id": 2 + }, + "targetResource": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "majorRevisionId": { + "type": "int64", + "id": 6 + }, + "minorRevisionId": { + "type": "int64", + "id": 7 + } + } + }, + "Trend": { + "fields": { + "duration": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "valuePercent": { + "type": "double", + "id": 2, + "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": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "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 + } + } + }, + "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" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "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 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "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": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "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_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "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": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "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": { + "edition": "proto2", + "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 + } + }, + "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 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "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 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "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 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "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": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "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" + }, + "parsedOptions": [ + { + "(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" + }, + "parsedOptions": [ + { + "(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" + }, + "parsedOptions": [ + { + "(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" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "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 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/interval;interval", + "java_multiple_files": true, + "java_outer_classname": "IntervalProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js new file mode 100644 index 00000000000..9b44a014cfe --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js @@ -0,0 +1,78 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, frameworkAudit) { + // [START cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this framework audit is created. + * Supported formats are the following: + * * `organizations/{organization_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `projects/{project_id}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The ID to use for the framework audit. The ID becomes the final + * component of the framework audit's full resource name. + * The ID must be between 4-63 characters, and valid characters + * are `\a-z 0-9 -\`. + */ + // const frameworkAuditId = 'abc123' + /** + * Required. The framework audit to create. + */ + // const frameworkAudit = {} + + // Imports the Cloudsecuritycompliance library + const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new AuditClient(); + + async function callCreateFrameworkAudit() { + // Construct request + const request = { + parent, + frameworkAudit, + }; + + // Run request + const [operation] = await cloudsecuritycomplianceClient.createFrameworkAudit(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateFrameworkAudit(); + // [END cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js new file mode 100644 index 00000000000..c0c248e3f4b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js @@ -0,0 +1,75 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(scope, reportFormat, complianceFramework) { + // [START cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The organization, folder or project for the audit report. + * Supported formats are the following: + * * `projects/{project_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `organizations/{organization_id}/locations/{location}` + */ + // const scope = 'abc123' + /** + * Required. The format that the scope report bytes is returned in. + */ + // const reportFormat = {} + /** + * Required. The compliance framework that the scope report is generated for. + */ + // const complianceFramework = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new AuditClient(); + + async function callGenerateFrameworkAuditScopeReport() { + // Construct request + const request = { + scope, + reportFormat, + complianceFramework, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.generateFrameworkAuditScopeReport(request); + console.log(response); + } + + callGenerateFrameworkAuditScopeReport(); + // [END cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js new file mode 100644 index 00000000000..b5488212195 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js @@ -0,0 +1,65 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the framework audit to retrieve. + * Supported formats are the following: + * * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + * * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + * * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + */ + // const name = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new AuditClient(); + + async function callGetFrameworkAudit() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.getFrameworkAudit(request); + console.log(response); + } + + callGetFrameworkAudit(); + // [END cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js new file mode 100644 index 00000000000..99083965240 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js @@ -0,0 +1,87 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where the framework audits are listed. + * Supported formats are the following: + * * `organizations/{organization_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `projects/{project_id}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of framework audits to return. The service + * might return fewer audits than this value. If unspecified, a maximum of 10 + * framework audits are returned. The maximum value is 50; values above 50 are + * limited to 50. + */ + // const pageSize = 1234 + /** + * Optional. The `next_page_token` value that's returned from a previous list + * request, if any. + */ + // const pageToken = 'abc123' + /** + * Optional. The filters to apply to the framework audits. + * Supported filters are `compliance_framework`, `compliance_state`, + * `create_time,` and `framework_audit_name`. If the filter is invalid, an + * invalid argument error is returned. + * For syntax details, see AIP-160 https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new AuditClient(); + + async function callListFrameworkAudits() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listFrameworkAuditsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFrameworkAudits(); + // [END cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js new file mode 100644 index 00000000000..730a95098ce --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js @@ -0,0 +1,65 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Compliance Manager enrollment to calculate. + * Supported formats are the following: + * * `organizations/{organization_id}/locations/{location}/cmEnrollment` + * * `folders/{folder_id}/locations/{location}/cmEnrollment` + * * `projects/{project_id}/locations/{location}/cmEnrollment` + */ + // const name = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {CmEnrollmentServiceClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new CmEnrollmentServiceClient(); + + async function callCalculateEffectiveCmEnrollment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.calculateEffectiveCmEnrollment(request); + console.log(response); + } + + callCalculateEffectiveCmEnrollment(); + // [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js new file mode 100644 index 00000000000..a058af97787 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(cmEnrollment) { + // [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Compliance Manager enrollment to update. + * The `name` field is used to identify the settings that you want to update. + */ + // const cmEnrollment = {} + /** + * Optional. The list of fields that you want to update. + */ + // const updateMask = {} + + // Imports the Cloudsecuritycompliance library + const {CmEnrollmentServiceClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new CmEnrollmentServiceClient(); + + async function callUpdateCmEnrollment() { + // Construct request + const request = { + cmEnrollment, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.updateCmEnrollment(request); + console.log(response); + } + + callUpdateCmEnrollment(); + // [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js new file mode 100644 index 00000000000..ba921be782e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, cloudControlId, cloudControl) { + // [START cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}`. + * - `projects/{project}/locations/{location}`. + * The only supported location is `global`. + */ + // const parent = 'abc123' + /** + * Required. The identifier for the cloud control, which is the last segment + * of the cloud control name. The format is + * `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. + */ + // const cloudControlId = 'abc123' + /** + * Required. The cloud control that's being created. + */ + // const cloudControl = {} + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callCreateCloudControl() { + // Construct request + const request = { + parent, + cloudControlId, + cloudControl, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.createCloudControl(request); + console.log(response); + } + + callCreateCloudControl(); + // [END cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js new file mode 100644 index 00000000000..01b7f00be2c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js @@ -0,0 +1,75 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, frameworkId, framework) { + // [START cloudsecuritycompliance_v1_generated_Config_CreateFramework_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * The only supported location is `global`. + */ + // const parent = 'abc123' + /** + * Required. The identifier (ID) of the framework. The ID is not the full name + * of the framework; it's the last part of the full name of the framework. + */ + // const frameworkId = 'abc123' + /** + * Required. The resource being created. + */ + // const framework = {} + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callCreateFramework() { + // Construct request + const request = { + parent, + frameworkId, + framework, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.createFramework(request); + console.log(response); + } + + callCreateFramework(); + // [END cloudsecuritycompliance_v1_generated_Config_CreateFramework_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js new file mode 100644 index 00000000000..341e9f4f6a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the cloud control to delete, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + * or + * `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + * The only supported location is `global`. + */ + // const name = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callDeleteCloudControl() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.deleteCloudControl(request); + console.log(response); + } + + callDeleteCloudControl(); + // [END cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js new file mode 100644 index 00000000000..103c52a4a93 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js @@ -0,0 +1,65 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the resource, in one of the following formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. + * The only supported location is `global`. + */ + // const name = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callDeleteFramework() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.deleteFramework(request); + console.log(response); + } + + callDeleteFramework(); + // [END cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js new file mode 100644 index 00000000000..cb9b86d8382 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js @@ -0,0 +1,71 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the cloud control to retrieve, in one of the + * following formats: + * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + * or + * `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + * The only supported location is `global`. + */ + // const name = 'abc123' + /** + * Optional. The major version of the cloud control to retrieve. If not + * specified, the most recently updated `revision_id` is retrieved. + */ + // const majorRevisionId = 1234 + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callGetCloudControl() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.getCloudControl(request); + console.log(response); + } + + callGetCloudControl(); + // [END cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js new file mode 100644 index 00000000000..3c883cf3035 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js @@ -0,0 +1,71 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Config_GetFramework_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the framework to retrieve, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. + * The only supported location is `global`. + */ + // const name = 'abc123' + /** + * Optional. The framework major version to retrieve. If not specified, the + * most recently updated `revision_id` is retrieved. + */ + // const majorRevisionId = 1234 + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callGetFramework() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.getFramework(request); + console.log(response); + } + + callGetFramework(); + // [END cloudsecuritycompliance_v1_generated_Config_GetFramework_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js new file mode 100644 index 00000000000..b6888455f71 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js @@ -0,0 +1,82 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * The only supported location is `global`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of cloud controls to return. The default value + * is `500`. + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token that's returned from a previous request to + * list cloud controls. Provide this token to retrieve the next page of + * results. + * When paginating, the parent that you provide to the + * ListCloudControls google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls + * request must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callListCloudControls() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listCloudControlsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCloudControls(); + // [END cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js new file mode 100644 index 00000000000..f37c2a647dc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js @@ -0,0 +1,78 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * The only supported location is `global`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of frameworks to return. The default value is + * `500`. + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request to list + * frameworks. Provide this token to retrieve the next page of results. + */ + // const pageToken = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callListFrameworks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listFrameworksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFrameworks(); + // [END cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js new file mode 100644 index 00000000000..54ced20aeb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(cloudControl) { + // [START cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_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. + */ + /** + * Optional. Use a field mask to specify the fields to be overwritten in the + * cloud control during the update. + * The fields that you specify in the `update_mask` are relative to the + * cloud control, not the full request. A field is overwritten if it is in + * the mask. If you don't provide a mask, all fields in the request + * are updated. + * You can update the following fields: + * - Display name + * - Description + * - Parameters + * - Rules + * - Parameter specification + */ + // const updateMask = {} + /** + * Required. The cloud control that you're updating. + */ + // const cloudControl = {} + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callUpdateCloudControl() { + // Construct request + const request = { + cloudControl, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.updateCloudControl(request); + console.log(response); + } + + callUpdateCloudControl(); + // [END cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js new file mode 100644 index 00000000000..3f6ba9747da --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(framework) { + // [START cloudsecuritycompliance_v1_generated_Config_UpdateFramework_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. + */ + /** + * Optional. A field mask is used to specify the fields to be overwritten in + * the framework resource by the update. The fields specified in the + * `update_mask` are relative to the resource, not the full request. A field + * is overwritten if it is in the mask. If you don't provide a mask then all + * fields present in the request will be overwritten. + */ + // const updateMask = {} + /** + * Required. The resource that is being updated. + */ + // const framework = {} + /** + * Optional. The major version ID of the framework to update. + */ + // const majorRevisionId = 1234 + + // Imports the Cloudsecuritycompliance library + const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new ConfigClient(); + + async function callUpdateFramework() { + // Construct request + const request = { + framework, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.updateFramework(request); + console.log(response); + } + + callUpdateFramework(); + // [END cloudsecuritycompliance_v1_generated_Config_UpdateFramework_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js new file mode 100644 index 00000000000..6d1895cfa54 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, frameworkDeployment) { + // [START cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the framework deployment in the format + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. + * Only the global location is supported. + */ + // const parent = 'abc123' + /** + * Optional. An identifier for the framework deployment that's unique in scope + * of the parent. If you don't specify a value, then a random UUID is + * generated. + */ + // const frameworkDeploymentId = 'abc123' + /** + * Required. The framework deployment that you're creating. + */ + // const frameworkDeployment = {} + + // Imports the Cloudsecuritycompliance library + const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new DeploymentClient(); + + async function callCreateFrameworkDeployment() { + // Construct request + const request = { + parent, + frameworkDeployment, + }; + + // Run request + const [operation] = await cloudsecuritycomplianceClient.createFrameworkDeployment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateFrameworkDeployment(); + // [END cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js new file mode 100644 index 00000000000..061be6c79d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the framework deployment that you want to delete, + * in the format + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + * The only supported location is `global`. + */ + // const name = 'abc123' + /** + * Optional. An opaque identifier for the current version of the resource. + * If you provide this value, then it must match the existing value. If the + * values don't match, then the request fails with an + * `ABORTED` google.rpc.Code.ABORTED error. + * If you omit this value, then the resource is deleted regardless of its + * current `etag` value. + */ + // const etag = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new DeploymentClient(); + + async function callDeleteFrameworkDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await cloudsecuritycomplianceClient.deleteFrameworkDeployment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFrameworkDeployment(); + // [END cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js new file mode 100644 index 00000000000..5700b2100de --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js @@ -0,0 +1,65 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name for the cloud control deployment, in the format + * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + * or + * `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + * The only supported location is `global`. + */ + // const name = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new DeploymentClient(); + + async function callGetCloudControlDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.getCloudControlDeployment(request); + console.log(response); + } + + callGetCloudControlDeployment(); + // [END cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js new file mode 100644 index 00000000000..8bd828cc6a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js @@ -0,0 +1,65 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the framework deployment, in the format + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + * The only supported location is `global`. + */ + // const name = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new DeploymentClient(); + + async function callGetFrameworkDeployment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.getFrameworkDeployment(request); + console.log(response); + } + + callGetFrameworkDeployment(); + // [END cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js new file mode 100644 index 00000000000..3b79a1db407 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js @@ -0,0 +1,90 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource for the cloud control deployment, in the + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + */ + // const parent = 'abc123' + /** + * Optional. The requested page size. The server might return fewer items than + * you requested. + * If unspecified, the server picks an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token that identifies the page of results that the server + * should return. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to apply on the resource, as defined by + * AIP-160: Filtering (https://google.aip.dev/160). + */ + // const filter = 'abc123' + /** + * Optional. The sort order for the results. The following values are + * supported: + * * `name` + * * `name desc` + * If you do not specify a value, then the results are not sorted. + */ + // const orderBy = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new DeploymentClient(); + + async function callListCloudControlDeployments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listCloudControlDeploymentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCloudControlDeployments(); + // [END cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js new file mode 100644 index 00000000000..df8505aaffd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js @@ -0,0 +1,91 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the framework deployment, in the format + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + */ + // const parent = 'abc123' + /** + * Optional. The requested page size. The server might return fewer items than + * requested. + * If unspecified, the server picks an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token that identifies a page of results the server should + * return. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to be applied on the resource, as defined by + * AIP-160: Filtering (https://google.aip.dev/160). + */ + // const filter = 'abc123' + /** + * Optional. The sort order for the results. The following values are + * supported: + * * `name` + * * `name desc` + * If you do not specify a value, then the results are not sorted. + */ + // const orderBy = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new DeploymentClient(); + + async function callListFrameworkDeployments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listFrameworkDeploymentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFrameworkDeployments(); + // [END cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js new file mode 100644 index 00000000000..001c9f5ce53 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the aggregated compliance report over time to + * retrieve. + * The supported format is: + * `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + */ + // const name = 'abc123' + /** + * Optional. The start and end time range for the aggregated compliance + * report. + */ + // const interval = {} + /** + * Optional. The filtering results. + */ + // const filter = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new MonitoringClient(); + + async function callAggregateFrameworkComplianceReport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.aggregateFrameworkComplianceReport(request); + console.log(response); + } + + callAggregateFrameworkComplianceReport(); + // [END cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js new file mode 100644 index 00000000000..15537e784c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the framework compliance report to retrieve. + */ + // const name = 'abc123' + /** + * Optional. The end time of the report. + */ + // const endTime = {} + /** + * Optional. The filtering results. + */ + // const filter = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new MonitoringClient(); + + async function callFetchFrameworkComplianceReport() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudsecuritycomplianceClient.fetchFrameworkComplianceReport(request); + console.log(response); + } + + callFetchFrameworkComplianceReport(); + // [END cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js new file mode 100644 index 00000000000..3c292d197ad --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent scope for the framework overview page. + */ + // const parent = 'abc123' + /** + * Optional. The end time of the control compliance summary. + */ + // const endTime = {} + /** + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token that identifies the page of results that the server + * should return. + */ + // const pageToken = 'abc123' + /** + * Optional. The filtering results. + */ + // const filter = 'abc123' + + // Imports the Cloudsecuritycompliance library + const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new MonitoringClient(); + + async function callListControlComplianceSummaries() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listControlComplianceSummariesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListControlComplianceSummaries(); + // [END cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js new file mode 100644 index 00000000000..0dd2bfce2e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent scope for the framework overview page. + */ + // const parent = 'abc123' + /** + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token that identifies the page of results that the server + * should return. + */ + // const pageToken = 'abc123' + /** + * Optional. The filtering results. + */ + // const filter = 'abc123' + /** + * Optional. The end time of the finding summary. + */ + // const endTime = {} + + // Imports the Cloudsecuritycompliance library + const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new MonitoringClient(); + + async function callListFindingSummaries() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listFindingSummariesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFindingSummaries(); + // [END cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js new file mode 100644 index 00000000000..b93c05a9230 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent scope for the framework compliance summary. + */ + // const parent = 'abc123' + /** + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token that identifies the page of results that the server + * should return. + */ + // const pageToken = 'abc123' + /** + * Optional. The filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Specifies the level of detail to return in the response. + */ + // const view = {} + + // Imports the Cloudsecuritycompliance library + const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; + + // Instantiates a client + const cloudsecuritycomplianceClient = new MonitoringClient(); + + async function callListFrameworkComplianceSummaries() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = cloudsecuritycomplianceClient.listFrameworkComplianceSummariesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFrameworkComplianceSummaries(); + // [END cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json new file mode 100644 index 00000000000..c60712c3a15 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json @@ -0,0 +1,1287 @@ +{ + "clientLibrary": { + "name": "nodejs-cloudsecuritycompliance", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.cloudsecuritycompliance.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async", + "title": "Audit generateFrameworkAuditScopeReport Sample", + "origin": "API_DEFINITION", + "description": " Generates an audit scope report for a framework.", + "canonical": true, + "file": "audit.generate_framework_audit_scope_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateFrameworkAuditScopeReport", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReport", + "async": true, + "parameters": [ + { + "name": "scope", + "type": "TYPE_STRING" + }, + { + "name": "report_format", + "type": ".google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format" + }, + { + "name": "compliance_framework", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse", + "client": { + "shortName": "AuditClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" + }, + "method": { + "shortName": "GenerateFrameworkAuditScopeReport", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReport", + "service": { + "shortName": "Audit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async", + "title": "Audit createFrameworkAudit Sample", + "origin": "API_DEFINITION", + "description": " Creates an audit scope report for a framework.", + "canonical": true, + "file": "audit.create_framework_audit.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFrameworkAudit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAudit", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "framework_audit_id", + "type": "TYPE_STRING" + }, + { + "name": "framework_audit", + "type": ".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AuditClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" + }, + "method": { + "shortName": "CreateFrameworkAudit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAudit", + "service": { + "shortName": "Audit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async", + "title": "Audit listFrameworkAudits Sample", + "origin": "API_DEFINITION", + "description": " Lists the framework audits for a given organization, folder, or project.", + "canonical": true, + "file": "audit.list_framework_audits.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFrameworkAudits", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAudits", + "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" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse", + "client": { + "shortName": "AuditClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" + }, + "method": { + "shortName": "ListFrameworkAudits", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAudits", + "service": { + "shortName": "Audit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async", + "title": "Audit getFrameworkAudit Sample", + "origin": "API_DEFINITION", + "description": " Gets the details for a framework audit.", + "canonical": true, + "file": "audit.get_framework_audit.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFrameworkAudit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAudit", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit", + "client": { + "shortName": "AuditClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" + }, + "method": { + "shortName": "GetFrameworkAudit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAudit", + "service": { + "shortName": "Audit", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async", + "title": "Audit updateCmEnrollment Sample", + "origin": "API_DEFINITION", + "description": " Updates the Compliance Manager enrollment for a resource to facilitate an audit. Use this method to enroll a resource in Compliance Manager or to create or update feature-specific configurations.", + "canonical": true, + "file": "cm_enrollment_service.update_cm_enrollment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCmEnrollment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollment", + "async": true, + "parameters": [ + { + "name": "cm_enrollment", + "type": ".google.cloud.cloudsecuritycompliance.v1.CmEnrollment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.CmEnrollment", + "client": { + "shortName": "CmEnrollmentServiceClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentServiceClient" + }, + "method": { + "shortName": "UpdateCmEnrollment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollment", + "service": { + "shortName": "CmEnrollmentService", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async", + "title": "Audit calculateEffectiveCmEnrollment Sample", + "origin": "API_DEFINITION", + "description": " Calculates the effective Compliance Manager enrollment for a resource. An effective enrollment is either a direct enrollment of a resource (if it exists), or an enrollment of the closest parent of a resource that's enrolled in Compliance Manager.", + "canonical": true, + "file": "cm_enrollment_service.calculate_effective_cm_enrollment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CalculateEffectiveCmEnrollment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse", + "client": { + "shortName": "CmEnrollmentServiceClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentServiceClient" + }, + "method": { + "shortName": "CalculateEffectiveCmEnrollment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollment", + "service": { + "shortName": "CmEnrollmentService", + "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async", + "title": "Audit listFrameworks Sample", + "origin": "API_DEFINITION", + "description": " Lists the frameworks (both built-in and custom) that are available within the parent resource. The latest major version of each framework is returned. This method supports pagination.", + "canonical": true, + "file": "config.list_frameworks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFrameworks", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "ListFrameworks", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworks", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_GetFramework_async", + "title": "Audit getFramework Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a framework. This method retrieves the latest major version of the framework. To retrieve a specific major version, include `major_revision_id` in the request.", + "canonical": true, + "file": "config.get_framework.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetFramework", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "major_revision_id", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.Framework", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "GetFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetFramework", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_CreateFramework_async", + "title": "Audit createFramework Sample", + "origin": "API_DEFINITION", + "description": " Creates a custom framework in a given parent resource. You can't create built-in frameworks because those are managed by Google.", + "canonical": true, + "file": "config.create_framework.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateFramework", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "framework_id", + "type": "TYPE_STRING" + }, + { + "name": "framework", + "type": ".google.cloud.cloudsecuritycompliance.v1.Framework" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.Framework", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "CreateFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateFramework", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_UpdateFramework_async", + "title": "Audit updateFramework Sample", + "origin": "API_DEFINITION", + "description": " Updates a custom framework. This method allows for partial updates of a framework. Use the `update_mask` to specify which fields to update. Consider the following: - If you provide an `update_mask`, only the fields that are specified in the mask are updated. - If you don't provide an `update_mask`, all the fields that are present in the request's `framework` body are used to overwrite the existing resource. You can only update frameworks with the `CUSTOM` type. A successful update creates a new version of the framework.", + "canonical": true, + "file": "config.update_framework.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateFramework", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "framework", + "type": ".google.cloud.cloudsecuritycompliance.v1.Framework" + }, + { + "name": "major_revision_id", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.Framework", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "UpdateFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateFramework", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async", + "title": "Audit deleteFramework Sample", + "origin": "API_DEFINITION", + "description": " Deletes a custom framework, including all its major and minor revisions. Consider the following: - You can't delete built-in frameworks. You can only delete frameworks with type `CUSTOM`. - You can't delete frameworks that are deployed to a resource. - You can't restore a deleted framework. This action is permanent.", + "canonical": true, + "file": "config.delete_framework.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteFramework", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "DeleteFramework", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteFramework", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async", + "title": "Audit listCloudControls Sample", + "origin": "API_DEFINITION", + "description": " Lists the cloud controls (both built-in and custom) that are available in a given parent resource. The latest major version of each cloud control is returned. This method supports pagination.", + "canonical": true, + "file": "config.list_cloud_controls.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCloudControls", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "ListCloudControls", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async", + "title": "Audit getCloudControl Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a cloud control. This method retrieves the latest major version of a cloud control that you identify by name. By default, the latest major version of the cloud control is returned. To retrieve a specific major version, include `major_revision_id` in the request.", + "canonical": true, + "file": "config.get_cloud_control.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControl", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "major_revision_id", + "type": "TYPE_INT64" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControl", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "GetCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControl", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async", + "title": "Audit createCloudControl Sample", + "origin": "API_DEFINITION", + "description": " Creates a custom cloud control in a given parent resource. You can't create built-in cloud controls because those are managed by Google.", + "canonical": true, + "file": "config.create_cloud_control.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControl", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "cloud_control_id", + "type": "TYPE_STRING" + }, + { + "name": "cloud_control", + "type": ".google.cloud.cloudsecuritycompliance.v1.CloudControl" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControl", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "CreateCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControl", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_async", + "title": "Audit updateCloudControl Sample", + "origin": "API_DEFINITION", + "description": " Updates a custom cloud control. This method allows for partial updates of a cloud control. Use the `update_mask` to specify which fields to update. Consider the following: - If you provide an `update_mask`, only the fields that are specified in the mask are updated. - If you don't provide an `update_mask`, all the fields that are present in the request's `cloud_control` body are used to overwrite the existing resource. You can only update cloud controls with the `CUSTOM` type. A successful update creates a new version of the cloud control.", + "canonical": true, + "file": "config.update_cloud_control.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControl", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "cloud_control", + "type": ".google.cloud.cloudsecuritycompliance.v1.CloudControl" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControl", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "UpdateCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControl", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async", + "title": "Audit deleteCloudControl Sample", + "origin": "API_DEFINITION", + "description": " Deletes a custom cloud control, including all its major and minor revisions. Consider the following: - You can't delete built-in cloud controls. You can only delete cloud controls with type `CUSTOM`. - You can't delete cloud controls if any of the versions are referenced by a framework. - You can't restore a deleted cloud control. This action is permanent.", + "canonical": true, + "file": "config.delete_cloud_control.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControl", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" + }, + "method": { + "shortName": "DeleteCloudControl", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControl", + "service": { + "shortName": "Config", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async", + "title": "Audit createFrameworkDeployment Sample", + "origin": "API_DEFINITION", + "description": " Creates a framework deployment in a given parent resource. A framework deployment lets you assign a particular framework version to an organization, folder, or project so that you can control and monitor those resources using the framework's cloud controls.", + "canonical": true, + "file": "deployment.create_framework_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFrameworkDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeployment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "framework_deployment_id", + "type": "TYPE_STRING" + }, + { + "name": "framework_deployment", + "type": ".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DeploymentClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" + }, + "method": { + "shortName": "CreateFrameworkDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeployment", + "service": { + "shortName": "Deployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async", + "title": "Audit deleteFrameworkDeployment Sample", + "origin": "API_DEFINITION", + "description": " Deletes a framework deployment.", + "canonical": true, + "file": "deployment.delete_framework_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFrameworkDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DeploymentClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" + }, + "method": { + "shortName": "DeleteFrameworkDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeployment", + "service": { + "shortName": "Deployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async", + "title": "Audit getFrameworkDeployment Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a framework deployment.", + "canonical": true, + "file": "deployment.get_framework_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFrameworkDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment", + "client": { + "shortName": "DeploymentClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" + }, + "method": { + "shortName": "GetFrameworkDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeployment", + "service": { + "shortName": "Deployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async", + "title": "Audit listFrameworkDeployments Sample", + "origin": "API_DEFINITION", + "description": " Lists the framework deployments in a given parent resource.", + "canonical": true, + "file": "deployment.list_framework_deployments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFrameworkDeployments", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeployments", + "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.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse", + "client": { + "shortName": "DeploymentClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" + }, + "method": { + "shortName": "ListFrameworkDeployments", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeployments", + "service": { + "shortName": "Deployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async", + "title": "Audit getCloudControlDeployment Sample", + "origin": "API_DEFINITION", + "description": " Gets details about a cloud control deployment.", + "canonical": true, + "file": "deployment.get_cloud_control_deployment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCloudControlDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeployment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment", + "client": { + "shortName": "DeploymentClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" + }, + "method": { + "shortName": "GetCloudControlDeployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeployment", + "service": { + "shortName": "Deployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async", + "title": "Audit listCloudControlDeployments Sample", + "origin": "API_DEFINITION", + "description": " Lists the cloud conrol deployments in a given parent resource.", + "canonical": true, + "file": "deployment.list_cloud_control_deployments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCloudControlDeployments", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeployments", + "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.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse", + "client": { + "shortName": "DeploymentClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" + }, + "method": { + "shortName": "ListCloudControlDeployments", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeployments", + "service": { + "shortName": "Deployment", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async", + "title": "Audit listFrameworkComplianceSummaries Sample", + "origin": "API_DEFINITION", + "description": " Lists the framework compliance summary for a given scope.", + "canonical": true, + "file": "monitoring.list_framework_compliance_summaries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFrameworkComplianceSummaries", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummaries", + "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": "view", + "type": ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse", + "client": { + "shortName": "MonitoringClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" + }, + "method": { + "shortName": "ListFrameworkComplianceSummaries", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummaries", + "service": { + "shortName": "Monitoring", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async", + "title": "Audit listFindingSummaries Sample", + "origin": "API_DEFINITION", + "description": " Lists the finding summary by category for a given scope.", + "canonical": true, + "file": "monitoring.list_finding_summaries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFindingSummaries", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummaries", + "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": "end_time", + "type": ".google.protobuf.Timestamp" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse", + "client": { + "shortName": "MonitoringClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" + }, + "method": { + "shortName": "ListFindingSummaries", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummaries", + "service": { + "shortName": "Monitoring", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async", + "title": "Audit fetchFrameworkComplianceReport Sample", + "origin": "API_DEFINITION", + "description": " Fetches the framework compliance report for a given scope.", + "canonical": true, + "file": "monitoring.fetch_framework_compliance_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchFrameworkComplianceReport", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "end_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport", + "client": { + "shortName": "MonitoringClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" + }, + "method": { + "shortName": "FetchFrameworkComplianceReport", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReport", + "service": { + "shortName": "Monitoring", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async", + "title": "Audit listControlComplianceSummaries Sample", + "origin": "API_DEFINITION", + "description": " Lists the control compliance summary for a given scope.", + "canonical": true, + "file": "monitoring.list_control_compliance_summaries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListControlComplianceSummaries", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummaries", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "end_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse", + "client": { + "shortName": "MonitoringClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" + }, + "method": { + "shortName": "ListControlComplianceSummaries", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummaries", + "service": { + "shortName": "Monitoring", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + } + }, + { + "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async", + "title": "Audit aggregateFrameworkComplianceReport Sample", + "origin": "API_DEFINITION", + "description": " Gets the aggregated compliance report over time for a given scope.", + "canonical": true, + "file": "monitoring.aggregate_framework_compliance_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AggregateFrameworkComplianceReport", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReport", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "interval", + "type": ".google.type.Interval" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse", + "client": { + "shortName": "MonitoringClient", + "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" + }, + "method": { + "shortName": "AggregateFrameworkComplianceReport", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReport", + "service": { + "shortName": "Monitoring", + "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts new file mode 100644 index 00000000000..196e4086ea6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts @@ -0,0 +1,35 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const AuditClient = v1.AuditClient; +type AuditClient = v1.AuditClient; +const CmEnrollmentServiceClient = v1.CmEnrollmentServiceClient; +type CmEnrollmentServiceClient = v1.CmEnrollmentServiceClient; +const ConfigClient = v1.ConfigClient; +type ConfigClient = v1.ConfigClient; +const DeploymentClient = v1.DeploymentClient; +type DeploymentClient = v1.DeploymentClient; +const MonitoringClient = v1.MonitoringClient; +type MonitoringClient = v1.MonitoringClient; + +export {v1, AuditClient, CmEnrollmentServiceClient, ConfigClient, DeploymentClient, MonitoringClient}; +export default {v1, AuditClient, CmEnrollmentServiceClient, ConfigClient, DeploymentClient, MonitoringClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts new file mode 100644 index 00000000000..ef8d67c8ff4 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts @@ -0,0 +1,2798 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/audit_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './audit_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources + * @class + * @memberof v1 + */ +export class AuditClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('cloudsecuritycompliance'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + auditStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AuditClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. + * 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 AuditClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AuditClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' + ), + folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), + organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cmEnrollment' + ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), + organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' + ), + organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' + ), + organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), + projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cmEnrollment' + ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), + projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' + ), + projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' + ), + projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), + }; + + // 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 = { + listFrameworkAudits: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworkAudits') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}',}], + },{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',additional_bindings: [{get: '/v1/{name=projects/*}/locations',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}/operations',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createFrameworkAuditResponse = protoFilesRoot.lookup( + '.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit') as gax.protobuf.Type; + const createFrameworkAuditMetadata = protoFilesRoot.lookup( + '.google.cloud.cloudsecuritycompliance.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createFrameworkAudit: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createFrameworkAuditResponse.decode.bind(createFrameworkAuditResponse), + createFrameworkAuditMetadata.decode.bind(createFrameworkAuditMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.cloudsecuritycompliance.v1.Audit', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.auditStub) { + return this.auditStub; + } + + // Put together the "service stub" for + // google.cloud.cloudsecuritycompliance.v1.Audit. + this.auditStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Audit') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Audit, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const auditStubMethods = + ['generateFrameworkAuditScopeReport', 'createFrameworkAudit', 'listFrameworkAudits', 'getFrameworkAudit']; + for (const methodName of auditStubMethods) { + const callPromise = this.auditStub.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._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.auditStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- +/** + * Generates an audit scope report for a framework. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.scope + * Required. The organization, folder or project for the audit report. + * + * Supported formats are the following: + * + * * `projects/{project_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `organizations/{organization_id}/locations/{location}` + * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format} request.reportFormat + * Required. The format that the scope report bytes is returned in. + * @param {string} request.complianceFramework + * Required. The compliance framework that the scope report is generated for. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse|GenerateFrameworkAuditScopeReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/audit.generate_framework_audit_scope_report.js + * region_tag:cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async + */ + generateFrameworkAuditScopeReport( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|undefined, {}|undefined + ]>; + generateFrameworkAuditScopeReport( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, + {}|null|undefined>): void; + generateFrameworkAuditScopeReport( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, + {}|null|undefined>): void; + generateFrameworkAuditScopeReport( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'scope': request.scope ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('generateFrameworkAuditScopeReport request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('generateFrameworkAuditScopeReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.generateFrameworkAuditScopeReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('generateFrameworkAuditScopeReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the details for a framework audit. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the framework audit to retrieve. + * + * Supported formats are the following: + * + * * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + * * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + * * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/audit.get_framework_audit.js + * region_tag:cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async + */ + getFrameworkAudit( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|undefined, {}|undefined + ]>; + getFrameworkAudit( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, + {}|null|undefined>): void; + getFrameworkAudit( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, + {}|null|undefined>): void; + getFrameworkAudit( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getFrameworkAudit request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFrameworkAudit response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getFrameworkAudit(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|undefined, + {}|undefined + ]) => { + this._log.info('getFrameworkAudit response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates an audit scope report for a framework. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this framework audit is created. + * + * Supported formats are the following: + * + * * `organizations/{organization_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `projects/{project_id}/locations/{location}` + * @param {string} [request.frameworkAuditId] + * Optional. The ID to use for the framework audit. The ID becomes the final + * component of the framework audit's full resource name. + * + * The ID must be between 4-63 characters, and valid characters + * are `\{@link protos.0-9|a-z}-\`. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} request.frameworkAudit + * Required. The framework audit to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/audit.create_framework_audit.js + * region_tag:cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async + */ + createFrameworkAudit( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createFrameworkAudit( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFrameworkAudit( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFrameworkAudit( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createFrameworkAudit response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createFrameworkAudit request %j', request); + return this.innerApiCalls.createFrameworkAudit(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createFrameworkAudit response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createFrameworkAudit()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/audit.create_framework_audit.js + * region_tag:cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async + */ + async checkCreateFrameworkAuditProgress(name: string): Promise>{ + this._log.info('createFrameworkAudit long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createFrameworkAudit, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists the framework audits for a given organization, folder, or project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where the framework audits are listed. + * + * Supported formats are the following: + * + * * `organizations/{organization_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `projects/{project_id}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of framework audits to return. The service + * might return fewer audits than this value. If unspecified, a maximum of 10 + * framework audits are returned. The maximum value is 50; values above 50 are + * limited to 50. + * @param {string} [request.pageToken] + * Optional. The `next_page_token` value that's returned from a previous list + * request, if any. + * @param {string} [request.filter] + * Optional. The filters to apply to the framework audits. + * Supported filters are `compliance_framework`, `compliance_state`, + * `create_time,` and `framework_audit_name`. If the filter is invalid, an + * invalid argument error is returned. + * For syntax details, see {@link protos.https://google.aip.dev/160|AIP-160}. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit}. + * 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 `listFrameworkAuditsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworkAudits( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse + ]>; + listFrameworkAudits( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>): void; + listFrameworkAudits( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>): void; + listFrameworkAudits( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFrameworkAudits values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFrameworkAudits request %j', request); + return this.innerApiCalls + .listFrameworkAudits(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse + ]) => { + this._log.info('listFrameworkAudits values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFrameworkAudits`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where the framework audits are listed. + * + * Supported formats are the following: + * + * * `organizations/{organization_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `projects/{project_id}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of framework audits to return. The service + * might return fewer audits than this value. If unspecified, a maximum of 10 + * framework audits are returned. The maximum value is 50; values above 50 are + * limited to 50. + * @param {string} [request.pageToken] + * Optional. The `next_page_token` value that's returned from a previous list + * request, if any. + * @param {string} [request.filter] + * Optional. The filters to apply to the framework audits. + * Supported filters are `compliance_framework`, `compliance_state`, + * `create_time,` and `framework_audit_name`. If the filter is invalid, an + * invalid argument error is returned. + * For syntax details, see {@link protos.https://google.aip.dev/160|AIP-160}. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit} 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 `listFrameworkAuditsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworkAuditsStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworkAudits']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworkAudits stream %j', request); + return this.descriptors.page.listFrameworkAudits.createStream( + this.innerApiCalls.listFrameworkAudits as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFrameworkAudits`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where the framework audits are listed. + * + * Supported formats are the following: + * + * * `organizations/{organization_id}/locations/{location}` + * * `folders/{folder_id}/locations/{location}` + * * `projects/{project_id}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of framework audits to return. The service + * might return fewer audits than this value. If unspecified, a maximum of 10 + * framework audits are returned. The maximum value is 50; values above 50 are + * limited to 50. + * @param {string} [request.pageToken] + * Optional. The `next_page_token` value that's returned from a previous list + * request, if any. + * @param {string} [request.filter] + * Optional. The filters to apply to the framework audits. + * Supported filters are `compliance_framework`, `compliance_state`, + * `create_time,` and `framework_audit_name`. If the filter is invalid, an + * invalid argument error is returned. + * For syntax details, see {@link protos.https://google.aip.dev/160|AIP-160}. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/audit.list_framework_audits.js + * region_tag:cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async + */ + listFrameworkAuditsAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworkAudits']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworkAudits iterate %j', request); + return this.descriptors.page.listFrameworkAudits.asyncIterate( + this.innerApiCalls['listFrameworkAudits'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * 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 + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. 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.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderLocationFindingSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ + folder: folder, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the folder from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * 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 organizationLocationCloudControlDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ + organization: organization, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified organizationLocationCloudControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ + organization: organization, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified organizationLocationCmEnrollment resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationCmEnrollmentPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; + } + + /** + * Parse the location from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + + /** + * Return a fully-qualified organizationLocationFindingSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ + organization: organization, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ + organization: organization, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAudits resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ + organization: organization, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified projectLocationCmEnrollment resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + projectLocationCmEnrollmentPath(project:string,location:string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; + } + + /** + * Parse the location from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + + /** + * Return a fully-qualified projectLocationFindingSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ + project: project, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the project from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ + project: project, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified projectLocationFrameworkAudits resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ + project: project, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.auditStub && !this._terminated) { + return this.auditStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json new file mode 100644 index 00000000000..13323b6af6b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.cloud.cloudsecuritycompliance.v1.Audit": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GenerateFrameworkAuditScopeReport": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateFrameworkAudit": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListFrameworkAudits": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetFrameworkAudit": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json new file mode 100644 index 00000000000..465d3b67d8b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" +] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts new file mode 100644 index 00000000000..4424c6801d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts @@ -0,0 +1,2106 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, LocationsClient, LocationProtos} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/cm_enrollment_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cm_enrollment_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing CmEnrollment related RPCs for + * complianceManager. + * @class + * @memberof v1 + */ +export class CmEnrollmentServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('cloudsecuritycompliance'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + cmEnrollmentServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CmEnrollmentServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. + * 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 CmEnrollmentServiceClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CmEnrollmentServiceClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' + ), + folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), + organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cmEnrollment' + ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), + organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' + ), + organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' + ), + organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), + projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cmEnrollment' + ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), + projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' + ), + projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' + ), + projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.cmEnrollmentServiceStub) { + return this.cmEnrollmentServiceStub; + } + + // Put together the "service stub" for + // google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService. + this.cmEnrollmentServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cmEnrollmentServiceStubMethods = + ['updateCmEnrollment', 'calculateEffectiveCmEnrollment']; + for (const methodName of cmEnrollmentServiceStubMethods) { + const callPromise = this.cmEnrollmentServiceStub.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 = + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.cmEnrollmentServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- +/** + * Updates the Compliance Manager enrollment for a resource to facilitate + * an audit. + * Use this method to enroll a resource in Compliance Manager or to + * create or update feature-specific configurations. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} request.cmEnrollment + * Required. The Compliance Manager enrollment to update. + * The `name` field is used to identify the settings that you want to update. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields that you want to update. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CmEnrollment|CmEnrollment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js + * region_tag:cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async + */ + updateCmEnrollment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|undefined, {}|undefined + ]>; + updateCmEnrollment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, + {}|null|undefined>): void; + updateCmEnrollment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, + {}|null|undefined>): void; + updateCmEnrollment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'cm_enrollment.name': request.cmEnrollment!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateCmEnrollment request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateCmEnrollment response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateCmEnrollment(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateCmEnrollment response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Calculates the effective Compliance Manager enrollment for a resource. + * An effective enrollment is either a direct enrollment of a + * resource (if it exists), or an enrollment of the closest parent of a + * resource that's enrolled in Compliance Manager. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Compliance Manager enrollment to calculate. + * + * Supported formats are the following: + * + * * `organizations/{organization_id}/locations/{location}/cmEnrollment` + * * `folders/{folder_id}/locations/{location}/cmEnrollment` + * * `projects/{project_id}/locations/{location}/cmEnrollment` + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse|CalculateEffectiveCmEnrollmentResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js + * region_tag:cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async + */ + calculateEffectiveCmEnrollment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|undefined, {}|undefined + ]>; + calculateEffectiveCmEnrollment( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, + {}|null|undefined>): void; + calculateEffectiveCmEnrollment( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, + {}|null|undefined>): void; + calculateEffectiveCmEnrollment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('calculateEffectiveCmEnrollment request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('calculateEffectiveCmEnrollment response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.calculateEffectiveCmEnrollment(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, + protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|undefined, + {}|undefined + ]) => { + this._log.info('calculateEffectiveCmEnrollment response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * 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 {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 -- + // -------------------- + + /** + * Return a fully-qualified folderLocationFindingSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ + folder: folder, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the folder from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ + organization: organization, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified organizationLocationCloudControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ + organization: organization, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified organizationLocationCmEnrollment resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationCmEnrollmentPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; + } + + /** + * Parse the location from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + + /** + * Return a fully-qualified organizationLocationFindingSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ + organization: organization, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ + organization: organization, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAudits resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ + organization: organization, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified projectLocationCmEnrollment resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + projectLocationCmEnrollmentPath(project:string,location:string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; + } + + /** + * Parse the location from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + + /** + * Return a fully-qualified projectLocationFindingSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ + project: project, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the project from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ + project: project, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified projectLocationFrameworkAudits resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ + project: project, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.cmEnrollmentServiceStub && !this._terminated) { + return this.cmEnrollmentServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json new file mode 100644 index 00000000000..22c9a9fecaa --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json @@ -0,0 +1,48 @@ +{ + "interfaces": { + "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "UpdateCmEnrollment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CalculateEffectiveCmEnrollment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json new file mode 100644 index 00000000000..465d3b67d8b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" +] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts new file mode 100644 index 00000000000..ae9357e3240 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts @@ -0,0 +1,3309 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/config_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './config_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Config Service manages compliance frameworks, cloud controls, and their + * configurations. + * @class + * @memberof v1 + */ +export class ConfigClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('cloudsecuritycompliance'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + configStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ConfigClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. + * 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 ConfigClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ConfigClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' + ), + folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}' + ), + organizationLocationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}' + ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), + organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cmEnrollment' + ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), + organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' + ), + organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' + ), + organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), + projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cmEnrollment' + ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), + projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' + ), + projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' + ), + projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), + }; + + // 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 = { + listFrameworks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworks'), + listCloudControls: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'cloudControls') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.cloudsecuritycompliance.v1.Config', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.configStub) { + return this.configStub; + } + + // Put together the "service stub" for + // google.cloud.cloudsecuritycompliance.v1.Config. + this.configStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Config') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Config, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const configStubMethods = + ['listFrameworks', 'getFramework', 'createFramework', 'updateFramework', 'deleteFramework', 'listCloudControls', 'getCloudControl', 'createCloudControl', 'updateCloudControl', 'deleteCloudControl']; + for (const methodName of configStubMethods) { + const callPromise = this.configStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.configStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- +/** + * Gets details about a framework. + * This method retrieves the latest major version of the framework. + * + * To retrieve a specific major version, include `major_revision_id` in + * the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the framework to retrieve, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. + * + * The only supported location is `global`. + * @param {number} [request.majorRevisionId] + * Optional. The framework major version to retrieve. If not specified, the + * most recently updated `revision_id` is retrieved. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_framework.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_GetFramework_async + */ + getFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|undefined, {}|undefined + ]>; + getFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, + {}|null|undefined>): void; + getFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, + {}|null|undefined>): void; + getFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getFramework request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFramework response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getFramework(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|undefined, + {}|undefined + ]) => { + this._log.info('getFramework response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a custom framework in a given parent resource. + * You can't create built-in frameworks because those are managed by + * Google. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {string} request.frameworkId + * Required. The identifier (ID) of the framework. The ID is not the full name + * of the framework; it's the last part of the full name of the framework. + * @param {google.cloud.cloudsecuritycompliance.v1.Framework} request.framework + * Required. The resource being created. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.create_framework.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_CreateFramework_async + */ + createFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|undefined, {}|undefined + ]>; + createFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, + {}|null|undefined>): void; + createFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, + {}|null|undefined>): void; + createFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createFramework request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createFramework response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createFramework(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|undefined, + {}|undefined + ]) => { + this._log.info('createFramework response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a custom framework. + * This method allows for partial updates of a framework. Use the + * `update_mask` to specify which fields to update. Consider the following: + * + * - If you provide an `update_mask`, only the fields that are specified + * in the mask are updated. + * - If you don't provide an `update_mask`, all the fields that are present + * in the request's `framework` body are used to overwrite the existing + * resource. + * + * You can only update frameworks with the `CUSTOM` type. + * A successful update creates a new version of the framework. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. A field mask is used to specify the fields to be overwritten in + * the framework resource by the update. The fields specified in the + * `update_mask` are relative to the resource, not the full request. A field + * is overwritten if it is in the mask. If you don't provide a mask then all + * fields present in the request will be overwritten. + * @param {google.cloud.cloudsecuritycompliance.v1.Framework} request.framework + * Required. The resource that is being updated. + * @param {number} [request.majorRevisionId] + * Optional. The major version ID of the framework to update. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_framework.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_UpdateFramework_async + */ + updateFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|undefined, {}|undefined + ]>; + updateFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, + {}|null|undefined>): void; + updateFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, + {}|null|undefined>): void; + updateFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'framework.name': request.framework!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateFramework request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateFramework response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateFramework(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateFramework response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a custom framework, including all its major and + * minor revisions. Consider the following: + * + * - You can't delete built-in frameworks. You can only delete frameworks + * with type `CUSTOM`. + * - You can't delete frameworks that are deployed to a resource. + * - You can't restore a deleted framework. This action is permanent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the resource, in one of the following formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. + * + * The only supported location is `global`. + * @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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.delete_framework.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async + */ + deleteFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|undefined, {}|undefined + ]>; + deleteFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, + {}|null|undefined>): void; + deleteFramework( + request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, + {}|null|undefined>): void; + deleteFramework( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteFramework request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteFramework response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteFramework(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteFramework response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details about a cloud control. + * This method retrieves the latest major version of a cloud control that + * you identify by name. + * + * By default, the latest major version of the cloud control is returned. + * To retrieve a specific major version, include `major_revision_id` in + * the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the cloud control to retrieve, in one of the + * following formats: + * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + * or + * `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + * + * The only supported location is `global`. + * @param {number} [request.majorRevisionId] + * Optional. The major version of the cloud control to retrieve. If not + * specified, the most recently updated `revision_id` is retrieved. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.get_cloud_control.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async + */ + getCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|undefined, {}|undefined + ]>; + getCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, + {}|null|undefined>): void; + getCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, + {}|null|undefined>): void; + getCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getCloudControl request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getCloudControl response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getCloudControl(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|undefined, + {}|undefined + ]) => { + this._log.info('getCloudControl response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Creates a custom cloud control in a given parent + * resource. + * You can't create built-in cloud controls because those are managed by + * Google. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}`. + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {string} request.cloudControlId + * Required. The identifier for the cloud control, which is the last segment + * of the cloud control name. The format is + * `^{@link protos.a-zA-Z0-9-|a-zA-Z}{0,61}[a-zA-Z0-9]$`. + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} request.cloudControl + * Required. The cloud control that's being created. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.create_cloud_control.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async + */ + createCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|undefined, {}|undefined + ]>; + createCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, + {}|null|undefined>): void; + createCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, + {}|null|undefined>): void; + createCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createCloudControl request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createCloudControl response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createCloudControl(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|undefined, + {}|undefined + ]) => { + this._log.info('createCloudControl response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates a custom cloud control. + * This method allows for partial updates of a cloud control. Use the + * `update_mask` to specify which fields to update. Consider the following: + * + * - If you provide an `update_mask`, only the fields that are specified + * in the mask are updated. + * - If you don't provide an `update_mask`, all the fields that are present + * in the request's `cloud_control` body are used to overwrite the existing + * resource. + * + * You can only update cloud controls with the `CUSTOM` type. + * A successful update creates a new version of the cloud control. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Use a field mask to specify the fields to be overwritten in the + * cloud control during the update. + * The fields that you specify in the `update_mask` are relative to the + * cloud control, not the full request. A field is overwritten if it is in + * the mask. If you don't provide a mask, all fields in the request + * are updated. + * + * You can update the following fields: + * + * - Display name + * - Description + * - Parameters + * - Rules + * - Parameter specification + * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} request.cloudControl + * Required. The cloud control that you're updating. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.update_cloud_control.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_async + */ + updateCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|undefined, {}|undefined + ]>; + updateCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, + {}|null|undefined>): void; + updateCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, + {}|null|undefined>): void; + updateCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'cloud_control.name': request.cloudControl!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateCloudControl request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateCloudControl response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateCloudControl(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, + protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateCloudControl response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes a custom cloud control, including all its + * major and minor revisions. Consider the following: + * + * - You can't delete built-in cloud controls. You can only delete cloud + * controls with type `CUSTOM`. + * - You can't delete cloud controls if any of the versions are referenced + * by a framework. + * - You can't restore a deleted cloud control. This action is permanent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the cloud control to delete, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + * or + * `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + * + * The only supported location is `global`. + * @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 {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.delete_cloud_control.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async + */ + deleteCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|undefined, {}|undefined + ]>; + deleteCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, + {}|null|undefined>): void; + deleteCloudControl( + request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, + {}|null|undefined>): void; + deleteCloudControl( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteCloudControl request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteCloudControl response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteCloudControl(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteCloudControl response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * Lists the frameworks (both built-in and custom) that are available within + * the parent resource. The latest major version of each framework is + * returned. + * This method supports pagination. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The maximum number of frameworks to return. The default value is + * `500`. + * + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request to list + * frameworks. Provide this token to retrieve the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. + * 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 `listFrameworksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworks( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse + ]>; + listFrameworks( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFramework>): void; + listFrameworks( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFramework>): void; + listFrameworks( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFramework>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFramework>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFramework>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFrameworks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFrameworks request %j', request); + return this.innerApiCalls + .listFrameworks(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFramework[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse + ]) => { + this._log.info('listFrameworks values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFrameworks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The maximum number of frameworks to return. The default value is + * `500`. + * + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request to list + * frameworks. Provide this token to retrieve the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework} 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 `listFrameworksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworksStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworks stream %j', request); + return this.descriptors.page.listFrameworks.createStream( + this.innerApiCalls.listFrameworks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFrameworks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The maximum number of frameworks to return. The default value is + * `500`. + * + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request to list + * frameworks. Provide this token to retrieve the next page of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_frameworks.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async + */ + listFrameworksAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworks iterate %j', request); + return this.descriptors.page.listFrameworks.asyncIterate( + this.innerApiCalls['listFrameworks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists the cloud controls (both built-in and custom) that are available + * in a given parent resource. The latest major version of each cloud control + * is returned. + * This method supports pagination. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The maximum number of cloud controls to return. The default value + * is `500`. + * + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + * @param {string} [request.pageToken] + * Optional. A pagination token that's returned from a previous request to + * list cloud controls. Provide this token to retrieve the next page of + * results. + * + * When paginating, the parent that you provide to the + * {@link protos.google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls|ListCloudControls} + * request must match the call that provided the page token. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. + * 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 `listCloudControlsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCloudControls( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[], + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse + ]>; + listCloudControls( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>): void; + listCloudControls( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>): void; + listCloudControls( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[], + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listCloudControls values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listCloudControls request %j', request); + return this.innerApiCalls + .listCloudControls(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[], + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse + ]) => { + this._log.info('listCloudControls values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listCloudControls`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The maximum number of cloud controls to return. The default value + * is `500`. + * + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + * @param {string} [request.pageToken] + * Optional. A pagination token that's returned from a previous request to + * list cloud controls. Provide this token to retrieve the next page of + * results. + * + * When paginating, the parent that you provide to the + * {@link protos.google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls|ListCloudControls} + * request must match the call that provided the page token. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl} 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 `listCloudControlsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCloudControlsStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCloudControls']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCloudControls stream %j', request); + return this.descriptors.page.listCloudControls.createStream( + this.innerApiCalls.listCloudControls as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listCloudControls`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The maximum number of cloud controls to return. The default value + * is `500`. + * + * If you exceed the maximum value of `1000`, then the service uses the + * maximum value. + * @param {string} [request.pageToken] + * Optional. A pagination token that's returned from a previous request to + * list cloud controls. Provide this token to retrieve the next page of + * results. + * + * When paginating, the parent that you provide to the + * {@link protos.google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls|ListCloudControls} + * request must match the call that provided the 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/config.list_cloud_controls.js + * region_tag:cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async + */ + listCloudControlsAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCloudControls']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCloudControls iterate %j', request); + return this.descriptors.page.listCloudControls.asyncIterate( + this.innerApiCalls['listCloudControls'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 -- + // -------------------- + + /** + * Return a fully-qualified folderLocationFindingSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ + folder: folder, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the folder from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization:string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; + } + + /** + * Return a fully-qualified organizationLocation resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; + } + + /** + * Parse the location from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; + } + + /** + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ + organization: organization, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified organizationLocationCloudControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ + organization: organization, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified organizationLocationCmEnrollment resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationCmEnrollmentPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; + } + + /** + * Parse the location from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + + /** + * Return a fully-qualified organizationLocationFindingSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ + organization: organization, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ + organization: organization, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAudits resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ + organization: organization, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified projectLocationCmEnrollment resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + projectLocationCmEnrollmentPath(project:string,location:string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; + } + + /** + * Parse the location from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + + /** + * Return a fully-qualified projectLocationFindingSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ + project: project, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the project from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ + project: project, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified projectLocationFrameworkAudits resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ + project: project, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.configStub && !this._terminated) { + return this.configStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json new file mode 100644 index 00000000000..cb2f3d7418e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json @@ -0,0 +1,88 @@ +{ + "interfaces": { + "google.cloud.cloudsecuritycompliance.v1.Config": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListFrameworks": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetFramework": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateFramework": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateFramework": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteFramework": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCloudControls": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetCloudControl": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateCloudControl": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCloudControl": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteCloudControl": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json new file mode 100644 index 00000000000..465d3b67d8b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" +] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts new file mode 100644 index 00000000000..b7dba1fd676 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts @@ -0,0 +1,3169 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/deployment_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './deployment_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Deployment service allows users to manage deployments of Frameworks and + * Cloud Controls on a target resource. + * @class + * @memberof v1 + */ +export class DeploymentClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('cloudsecuritycompliance'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + deploymentStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DeploymentClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. + * 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 DeploymentClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DeploymentClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' + ), + folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}' + ), + organizationLocationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}' + ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), + organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cmEnrollment' + ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), + organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' + ), + organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' + ), + organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), + projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cmEnrollment' + ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), + projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' + ), + projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' + ), + projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), + }; + + // 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 = { + listFrameworkDeployments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworkDeployments'), + listCloudControlDeployments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'cloudControlDeployments') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}',}], + },{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',additional_bindings: [{get: '/v1/{name=projects/*}/locations',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}/operations',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createFrameworkDeploymentResponse = protoFilesRoot.lookup( + '.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment') as gax.protobuf.Type; + const createFrameworkDeploymentMetadata = protoFilesRoot.lookup( + '.google.cloud.cloudsecuritycompliance.v1.OperationMetadata') as gax.protobuf.Type; + const deleteFrameworkDeploymentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteFrameworkDeploymentMetadata = protoFilesRoot.lookup( + '.google.cloud.cloudsecuritycompliance.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createFrameworkDeployment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createFrameworkDeploymentResponse.decode.bind(createFrameworkDeploymentResponse), + createFrameworkDeploymentMetadata.decode.bind(createFrameworkDeploymentMetadata)), + deleteFrameworkDeployment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFrameworkDeploymentResponse.decode.bind(deleteFrameworkDeploymentResponse), + deleteFrameworkDeploymentMetadata.decode.bind(deleteFrameworkDeploymentMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.cloudsecuritycompliance.v1.Deployment', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.deploymentStub) { + return this.deploymentStub; + } + + // Put together the "service stub" for + // google.cloud.cloudsecuritycompliance.v1.Deployment. + this.deploymentStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Deployment') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Deployment, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const deploymentStubMethods = + ['createFrameworkDeployment', 'deleteFrameworkDeployment', 'getFrameworkDeployment', 'listFrameworkDeployments', 'getCloudControlDeployment', 'listCloudControlDeployments']; + for (const methodName of deploymentStubMethods) { + const callPromise = this.deploymentStub.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._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.deploymentStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- +/** + * Gets details about a framework deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the framework deployment, in the format + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + * The only supported location is `global`. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.get_framework_deployment.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async + */ + getFrameworkDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|undefined, {}|undefined + ]>; + getFrameworkDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, + {}|null|undefined>): void; + getFrameworkDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, + {}|null|undefined>): void; + getFrameworkDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getFrameworkDeployment request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFrameworkDeployment response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getFrameworkDeployment(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getFrameworkDeployment response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details about a cloud control deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name for the cloud control deployment, in the format + * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + * or + * `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + * The only supported location is `global`. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.get_cloud_control_deployment.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async + */ + getCloudControlDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|undefined, {}|undefined + ]>; + getCloudControlDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, + {}|null|undefined>): void; + getCloudControlDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, + {}|null|undefined>): void; + getCloudControlDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getCloudControlDeployment request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getCloudControlDeployment response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getCloudControlDeployment(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, + protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|undefined, + {}|undefined + ]) => { + this._log.info('getCloudControlDeployment response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates a framework deployment in a given parent resource. A + * framework deployment lets you assign a particular framework version to an + * organization, folder, or project so that you can control and monitor + * those resources using the framework's cloud controls. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the framework deployment in the format + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. + * Only the global location is supported. + * @param {string} [request.frameworkDeploymentId] + * Optional. An identifier for the framework deployment that's unique in scope + * of the parent. If you don't specify a value, then a random UUID is + * generated. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} request.frameworkDeployment + * Required. The framework deployment that you're creating. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.create_framework_deployment.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async + */ + createFrameworkDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createFrameworkDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFrameworkDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFrameworkDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createFrameworkDeployment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createFrameworkDeployment request %j', request); + return this.innerApiCalls.createFrameworkDeployment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createFrameworkDeployment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createFrameworkDeployment()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.create_framework_deployment.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async + */ + async checkCreateFrameworkDeploymentProgress(name: string): Promise>{ + this._log.info('createFrameworkDeployment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createFrameworkDeployment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a framework deployment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the framework deployment that you want to delete, + * in the format + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + * The only supported location is `global`. + * @param {string} [request.etag] + * Optional. An opaque identifier for the current version of the resource. + * + * If you provide this value, then it must match the existing value. If the + * values don't match, then the request fails with an + * {@link protos.google.rpc.Code.ABORTED|`ABORTED`} error. + * + * If you omit this value, then the resource is deleted regardless of its + * current `etag` value. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.delete_framework_deployment.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async + */ + deleteFrameworkDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteFrameworkDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFrameworkDeployment( + request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFrameworkDeployment( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteFrameworkDeployment response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteFrameworkDeployment request %j', request); + return this.innerApiCalls.deleteFrameworkDeployment(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteFrameworkDeployment response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteFrameworkDeployment()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.delete_framework_deployment.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async + */ + async checkDeleteFrameworkDeploymentProgress(name: string): Promise>{ + this._log.info('deleteFrameworkDeployment long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteFrameworkDeployment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists the framework deployments in a given parent resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the framework deployment, in the format + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. + * If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies a page of results the server should + * return. + * @param {string} [request.filter] + * Optional. The filter to be applied on the resource, as defined by + * [AIP-160: Filtering](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. The sort order for the results. The following values are + * supported: + * + * * `name` + * * `name desc` + * + * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment}. + * 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 `listFrameworkDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworkDeployments( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse + ]>; + listFrameworkDeployments( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>): void; + listFrameworkDeployments( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>): void; + listFrameworkDeployments( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFrameworkDeployments values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFrameworkDeployments request %j', request); + return this.innerApiCalls + .listFrameworkDeployments(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse + ]) => { + this._log.info('listFrameworkDeployments values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFrameworkDeployments`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the framework deployment, in the format + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. + * If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies a page of results the server should + * return. + * @param {string} [request.filter] + * Optional. The filter to be applied on the resource, as defined by + * [AIP-160: Filtering](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. The sort order for the results. The following values are + * supported: + * + * * `name` + * * `name desc` + * + * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment} 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 `listFrameworkDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworkDeploymentsStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworkDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworkDeployments stream %j', request); + return this.descriptors.page.listFrameworkDeployments.createStream( + this.innerApiCalls.listFrameworkDeployments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFrameworkDeployments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the framework deployment, in the format + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. + * If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies a page of results the server should + * return. + * @param {string} [request.filter] + * Optional. The filter to be applied on the resource, as defined by + * [AIP-160: Filtering](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. The sort order for the results. The following values are + * supported: + * + * * `name` + * * `name desc` + * + * If you do not specify a value, then the results are not 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.list_framework_deployments.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async + */ + listFrameworkDeploymentsAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworkDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworkDeployments iterate %j', request); + return this.descriptors.page.listFrameworkDeployments.asyncIterate( + this.innerApiCalls['listFrameworkDeployments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists the cloud conrol deployments in a given parent resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource for the cloud control deployment, in the + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * you requested. + * If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filter to apply on the resource, as defined by + * [AIP-160: Filtering](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. The sort order for the results. The following values are + * supported: + * + * * `name` + * * `name desc` + * + * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment}. + * 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 `listCloudControlDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCloudControlDeployments( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[], + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse + ]>; + listCloudControlDeployments( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>): void; + listCloudControlDeployments( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>): void; + listCloudControlDeployments( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[], + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listCloudControlDeployments values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listCloudControlDeployments request %j', request); + return this.innerApiCalls + .listCloudControlDeployments(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[], + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse + ]) => { + this._log.info('listCloudControlDeployments values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listCloudControlDeployments`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource for the cloud control deployment, in the + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * you requested. + * If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filter to apply on the resource, as defined by + * [AIP-160: Filtering](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. The sort order for the results. The following values are + * supported: + * + * * `name` + * * `name desc` + * + * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment} 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 `listCloudControlDeploymentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listCloudControlDeploymentsStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCloudControlDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCloudControlDeployments stream %j', request); + return this.descriptors.page.listCloudControlDeployments.createStream( + this.innerApiCalls.listCloudControlDeployments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listCloudControlDeployments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource for the cloud control deployment, in the + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * you requested. + * If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filter to apply on the resource, as defined by + * [AIP-160: Filtering](https://google.aip.dev/160). + * @param {string} [request.orderBy] + * Optional. The sort order for the results. The following values are + * supported: + * + * * `name` + * * `name desc` + * + * If you do not specify a value, then the results are not 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment.list_cloud_control_deployments.js + * region_tag:cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async + */ + listCloudControlDeploymentsAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCloudControlDeployments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listCloudControlDeployments iterate %j', request); + return this.descriptors.page.listCloudControlDeployments.asyncIterate( + this.innerApiCalls['listCloudControlDeployments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * 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 + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. 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.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + 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'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderLocationFindingSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ + folder: folder, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the folder from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization:string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; + } + + /** + * Return a fully-qualified organizationLocation resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; + } + + /** + * Parse the location from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; + } + + /** + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ + organization: organization, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified organizationLocationCloudControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ + organization: organization, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified organizationLocationCmEnrollment resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationCmEnrollmentPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; + } + + /** + * Parse the location from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + + /** + * Return a fully-qualified organizationLocationFindingSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ + organization: organization, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ + organization: organization, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAudits resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ + organization: organization, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified projectLocationCmEnrollment resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + projectLocationCmEnrollmentPath(project:string,location:string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; + } + + /** + * Parse the location from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + + /** + * Return a fully-qualified projectLocationFindingSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ + project: project, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the project from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ + project: project, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified projectLocationFrameworkAudits resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ + project: project, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.deploymentStub && !this._terminated) { + return this.deploymentStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json new file mode 100644 index 00000000000..e5663f0c004 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json @@ -0,0 +1,68 @@ +{ + "interfaces": { + "google.cloud.cloudsecuritycompliance.v1.Deployment": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateFrameworkDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteFrameworkDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetFrameworkDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListFrameworkDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetCloudControlDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListCloudControlDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json new file mode 100644 index 00000000000..465d3b67d8b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" +] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..9131f18ffe4 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json @@ -0,0 +1,381 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.cloudsecuritycompliance.v1", + "libraryPackage": "@google-cloud/cloudsecuritycompliance", + "services": { + "Audit": { + "clients": { + "grpc": { + "libraryClient": "AuditClient", + "rpcs": { + "GenerateFrameworkAuditScopeReport": { + "methods": [ + "generateFrameworkAuditScopeReport" + ] + }, + "GetFrameworkAudit": { + "methods": [ + "getFrameworkAudit" + ] + }, + "CreateFrameworkAudit": { + "methods": [ + "createFrameworkAudit" + ] + }, + "ListFrameworkAudits": { + "methods": [ + "listFrameworkAudits", + "listFrameworkAuditsStream", + "listFrameworkAuditsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AuditClient", + "rpcs": { + "GenerateFrameworkAuditScopeReport": { + "methods": [ + "generateFrameworkAuditScopeReport" + ] + }, + "GetFrameworkAudit": { + "methods": [ + "getFrameworkAudit" + ] + }, + "CreateFrameworkAudit": { + "methods": [ + "createFrameworkAudit" + ] + }, + "ListFrameworkAudits": { + "methods": [ + "listFrameworkAudits", + "listFrameworkAuditsStream", + "listFrameworkAuditsAsync" + ] + } + } + } + } + }, + "CmEnrollmentService": { + "clients": { + "grpc": { + "libraryClient": "CmEnrollmentServiceClient", + "rpcs": { + "UpdateCmEnrollment": { + "methods": [ + "updateCmEnrollment" + ] + }, + "CalculateEffectiveCmEnrollment": { + "methods": [ + "calculateEffectiveCmEnrollment" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CmEnrollmentServiceClient", + "rpcs": { + "UpdateCmEnrollment": { + "methods": [ + "updateCmEnrollment" + ] + }, + "CalculateEffectiveCmEnrollment": { + "methods": [ + "calculateEffectiveCmEnrollment" + ] + } + } + } + } + }, + "Config": { + "clients": { + "grpc": { + "libraryClient": "ConfigClient", + "rpcs": { + "GetFramework": { + "methods": [ + "getFramework" + ] + }, + "CreateFramework": { + "methods": [ + "createFramework" + ] + }, + "UpdateFramework": { + "methods": [ + "updateFramework" + ] + }, + "DeleteFramework": { + "methods": [ + "deleteFramework" + ] + }, + "GetCloudControl": { + "methods": [ + "getCloudControl" + ] + }, + "CreateCloudControl": { + "methods": [ + "createCloudControl" + ] + }, + "UpdateCloudControl": { + "methods": [ + "updateCloudControl" + ] + }, + "DeleteCloudControl": { + "methods": [ + "deleteCloudControl" + ] + }, + "ListFrameworks": { + "methods": [ + "listFrameworks", + "listFrameworksStream", + "listFrameworksAsync" + ] + }, + "ListCloudControls": { + "methods": [ + "listCloudControls", + "listCloudControlsStream", + "listCloudControlsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ConfigClient", + "rpcs": { + "GetFramework": { + "methods": [ + "getFramework" + ] + }, + "CreateFramework": { + "methods": [ + "createFramework" + ] + }, + "UpdateFramework": { + "methods": [ + "updateFramework" + ] + }, + "DeleteFramework": { + "methods": [ + "deleteFramework" + ] + }, + "GetCloudControl": { + "methods": [ + "getCloudControl" + ] + }, + "CreateCloudControl": { + "methods": [ + "createCloudControl" + ] + }, + "UpdateCloudControl": { + "methods": [ + "updateCloudControl" + ] + }, + "DeleteCloudControl": { + "methods": [ + "deleteCloudControl" + ] + }, + "ListFrameworks": { + "methods": [ + "listFrameworks", + "listFrameworksStream", + "listFrameworksAsync" + ] + }, + "ListCloudControls": { + "methods": [ + "listCloudControls", + "listCloudControlsStream", + "listCloudControlsAsync" + ] + } + } + } + } + }, + "Deployment": { + "clients": { + "grpc": { + "libraryClient": "DeploymentClient", + "rpcs": { + "GetFrameworkDeployment": { + "methods": [ + "getFrameworkDeployment" + ] + }, + "GetCloudControlDeployment": { + "methods": [ + "getCloudControlDeployment" + ] + }, + "CreateFrameworkDeployment": { + "methods": [ + "createFrameworkDeployment" + ] + }, + "DeleteFrameworkDeployment": { + "methods": [ + "deleteFrameworkDeployment" + ] + }, + "ListFrameworkDeployments": { + "methods": [ + "listFrameworkDeployments", + "listFrameworkDeploymentsStream", + "listFrameworkDeploymentsAsync" + ] + }, + "ListCloudControlDeployments": { + "methods": [ + "listCloudControlDeployments", + "listCloudControlDeploymentsStream", + "listCloudControlDeploymentsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DeploymentClient", + "rpcs": { + "GetFrameworkDeployment": { + "methods": [ + "getFrameworkDeployment" + ] + }, + "GetCloudControlDeployment": { + "methods": [ + "getCloudControlDeployment" + ] + }, + "CreateFrameworkDeployment": { + "methods": [ + "createFrameworkDeployment" + ] + }, + "DeleteFrameworkDeployment": { + "methods": [ + "deleteFrameworkDeployment" + ] + }, + "ListFrameworkDeployments": { + "methods": [ + "listFrameworkDeployments", + "listFrameworkDeploymentsStream", + "listFrameworkDeploymentsAsync" + ] + }, + "ListCloudControlDeployments": { + "methods": [ + "listCloudControlDeployments", + "listCloudControlDeploymentsStream", + "listCloudControlDeploymentsAsync" + ] + } + } + } + } + }, + "Monitoring": { + "clients": { + "grpc": { + "libraryClient": "MonitoringClient", + "rpcs": { + "FetchFrameworkComplianceReport": { + "methods": [ + "fetchFrameworkComplianceReport" + ] + }, + "AggregateFrameworkComplianceReport": { + "methods": [ + "aggregateFrameworkComplianceReport" + ] + }, + "ListFrameworkComplianceSummaries": { + "methods": [ + "listFrameworkComplianceSummaries", + "listFrameworkComplianceSummariesStream", + "listFrameworkComplianceSummariesAsync" + ] + }, + "ListFindingSummaries": { + "methods": [ + "listFindingSummaries", + "listFindingSummariesStream", + "listFindingSummariesAsync" + ] + }, + "ListControlComplianceSummaries": { + "methods": [ + "listControlComplianceSummaries", + "listControlComplianceSummariesStream", + "listControlComplianceSummariesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MonitoringClient", + "rpcs": { + "FetchFrameworkComplianceReport": { + "methods": [ + "fetchFrameworkComplianceReport" + ] + }, + "AggregateFrameworkComplianceReport": { + "methods": [ + "aggregateFrameworkComplianceReport" + ] + }, + "ListFrameworkComplianceSummaries": { + "methods": [ + "listFrameworkComplianceSummaries", + "listFrameworkComplianceSummariesStream", + "listFrameworkComplianceSummariesAsync" + ] + }, + "ListFindingSummaries": { + "methods": [ + "listFindingSummaries", + "listFindingSummariesStream", + "listFindingSummariesAsync" + ] + }, + "ListControlComplianceSummaries": { + "methods": [ + "listControlComplianceSummaries", + "listControlComplianceSummariesStream", + "listControlComplianceSummariesAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts new file mode 100644 index 00000000000..aee79448a9d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts @@ -0,0 +1,23 @@ +// Copyright 2026 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 {AuditClient} from './audit_client'; +export {CmEnrollmentServiceClient} from './cm_enrollment_service_client'; +export {ConfigClient} from './config_client'; +export {DeploymentClient} from './deployment_client'; +export {MonitoringClient} from './monitoring_client'; diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts new file mode 100644 index 00000000000..71b4dc65ffa --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts @@ -0,0 +1,2808 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/monitoring_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './monitoring_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources + * @class + * @memberof v1 + */ +export class MonitoringClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('cloudsecuritycompliance'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + monitoringStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MonitoringClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. + * 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 MonitoringClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MonitoringClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' + ), + folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), + organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cmEnrollment' + ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), + organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' + ), + organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' + ), + organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), + projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cmEnrollment' + ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), + projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' + ), + projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' + ), + projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' + ), + projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' + ), + projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' + ), + projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' + ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), + }; + + // 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 = { + listFrameworkComplianceSummaries: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworkComplianceSummaries'), + listFindingSummaries: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'findingSummaries'), + listControlComplianceSummaries: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controlComplianceSummaries') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.cloudsecuritycompliance.v1.Monitoring', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.monitoringStub) { + return this.monitoringStub; + } + + // Put together the "service stub" for + // google.cloud.cloudsecuritycompliance.v1.Monitoring. + this.monitoringStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Monitoring') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Monitoring, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const monitoringStubMethods = + ['listFrameworkComplianceSummaries', 'listFindingSummaries', 'fetchFrameworkComplianceReport', 'listControlComplianceSummaries', 'aggregateFrameworkComplianceReport']; + for (const methodName of monitoringStubMethods) { + const callPromise = this.monitoringStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.monitoringStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'cloudsecuritycompliance.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- +/** + * Fetches the framework compliance report for a given scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the framework compliance report to retrieve. + * @param {google.protobuf.Timestamp} [request.endTime] + * Optional. The end time of the report. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport|FrameworkComplianceReport}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/monitoring.fetch_framework_compliance_report.js + * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async + */ + fetchFrameworkComplianceReport( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|undefined, {}|undefined + ]>; + fetchFrameworkComplianceReport( + request: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>): void; + fetchFrameworkComplianceReport( + request: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>): void; + fetchFrameworkComplianceReport( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('fetchFrameworkComplianceReport request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('fetchFrameworkComplianceReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.fetchFrameworkComplianceReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, + protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('fetchFrameworkComplianceReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the aggregated compliance report over time for a given scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the aggregated compliance report over time to + * retrieve. + * + * The supported format is: + * `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + * @param {google.type.Interval} [request.interval] + * Optional. The start and end time range for the aggregated compliance + * report. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse|AggregateFrameworkComplianceReportResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/monitoring.aggregate_framework_compliance_report.js + * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async + */ + aggregateFrameworkComplianceReport( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|undefined, {}|undefined + ]>; + aggregateFrameworkComplianceReport( + request: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>): void; + aggregateFrameworkComplianceReport( + request: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, + callback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>): void; + aggregateFrameworkComplianceReport( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('aggregateFrameworkComplianceReport request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('aggregateFrameworkComplianceReport response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.aggregateFrameworkComplianceReport(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, + protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|undefined, + {}|undefined + ]) => { + this._log.info('aggregateFrameworkComplianceReport response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * Lists the framework compliance summary for a given scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework compliance summary. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] + * Optional. Specifies the level of detail to return in the response. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary|FrameworkComplianceSummary}. + * 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 `listFrameworkComplianceSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworkComplianceSummaries( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse + ]>; + listFrameworkComplianceSummaries( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>): void; + listFrameworkComplianceSummaries( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>): void; + listFrameworkComplianceSummaries( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFrameworkComplianceSummaries values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFrameworkComplianceSummaries request %j', request); + return this.innerApiCalls + .listFrameworkComplianceSummaries(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse + ]) => { + this._log.info('listFrameworkComplianceSummaries values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFrameworkComplianceSummaries`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework compliance summary. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] + * Optional. Specifies the level of detail to return in the response. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary|FrameworkComplianceSummary} 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 `listFrameworkComplianceSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFrameworkComplianceSummariesStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworkComplianceSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworkComplianceSummaries stream %j', request); + return this.descriptors.page.listFrameworkComplianceSummaries.createStream( + this.innerApiCalls.listFrameworkComplianceSummaries as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFrameworkComplianceSummaries`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework compliance summary. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] + * Optional. Specifies the level of detail to return in the response. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary|FrameworkComplianceSummary}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/monitoring.list_framework_compliance_summaries.js + * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async + */ + listFrameworkComplianceSummariesAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFrameworkComplianceSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFrameworkComplianceSummaries iterate %j', request); + return this.descriptors.page.listFrameworkComplianceSummaries.asyncIterate( + this.innerApiCalls['listFrameworkComplianceSummaries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists the finding summary by category for a given scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework overview page. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {google.protobuf.Timestamp} [request.endTime] + * Optional. The end time of the finding summary. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary|FindingSummary}. + * 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 `listFindingSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFindingSummaries( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse + ]>; + listFindingSummaries( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>): void; + listFindingSummaries( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>): void; + listFindingSummaries( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFindingSummaries values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFindingSummaries request %j', request); + return this.innerApiCalls + .listFindingSummaries(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse + ]) => { + this._log.info('listFindingSummaries values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFindingSummaries`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework overview page. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {google.protobuf.Timestamp} [request.endTime] + * Optional. The end time of the finding summary. + * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary|FindingSummary} 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 `listFindingSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFindingSummariesStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFindingSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFindingSummaries stream %j', request); + return this.descriptors.page.listFindingSummaries.createStream( + this.innerApiCalls.listFindingSummaries as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFindingSummaries`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework overview page. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {google.protobuf.Timestamp} [request.endTime] + * Optional. The end time of the finding summary. + * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary|FindingSummary}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/monitoring.list_finding_summaries.js + * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async + */ + listFindingSummariesAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFindingSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFindingSummaries iterate %j', request); + return this.descriptors.page.listFindingSummaries.asyncIterate( + this.innerApiCalls['listFindingSummaries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists the control compliance summary for a given scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework overview page. + * @param {google.protobuf.Timestamp} [request.endTime] + * Optional. The end time of the control compliance summary. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary|ControlComplianceSummary}. + * 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 `listControlComplianceSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listControlComplianceSummaries( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse + ]>; + listControlComplianceSummaries( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>): void; + listControlComplianceSummaries( + request: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + callback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>): void; + listControlComplianceSummaries( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>, + callback?: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>): + Promise<[ + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listControlComplianceSummaries values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listControlComplianceSummaries request %j', request); + return this.innerApiCalls + .listControlComplianceSummaries(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[], + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest|null, + protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse + ]) => { + this._log.info('listControlComplianceSummaries values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listControlComplianceSummaries`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework overview page. + * @param {google.protobuf.Timestamp} [request.endTime] + * Optional. The end time of the control compliance summary. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary|ControlComplianceSummary} 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 `listControlComplianceSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listControlComplianceSummariesStream( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listControlComplianceSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listControlComplianceSummaries stream %j', request); + return this.descriptors.page.listControlComplianceSummaries.createStream( + this.innerApiCalls.listControlComplianceSummaries as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listControlComplianceSummaries`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent scope for the framework overview page. + * @param {google.protobuf.Timestamp} [request.endTime] + * Optional. The end time of the control compliance summary. + * @param {number} [request.pageSize] + * Optional. The requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token that identifies the page of results that the server + * should return. + * @param {string} [request.filter] + * Optional. The filtering results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary|ControlComplianceSummary}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/monitoring.list_control_compliance_summaries.js + * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async + */ + listControlComplianceSummariesAsync( + request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listControlComplianceSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listControlComplianceSummaries iterate %j', request); + return this.descriptors.page.listControlComplianceSummaries.asyncIterate( + this.innerApiCalls['listControlComplianceSummaries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 -- + // -------------------- + + /** + * Return a fully-qualified folderLocationFindingSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ + folder: folder, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the folder from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from FolderLocationFindingSummaries resource. + * + * @param {string} folderLocationFindingSummariesName + * A fully-qualified path representing folder_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { + return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. + * + * @param {string} folderLocationFrameworkComplianceReportsName + * A fully-qualified path representing folder_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ + folder: folder, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; + } + + /** + * Parse the location from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. + * + * @param {string} folderLocationFrameworkComplianceSummariesName + * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * 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 organizationLocationCloudControlDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ + organization: organization, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. + * + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified organizationLocationCloudControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ + organization: organization, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the organization from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified organizationLocationCmEnrollment resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationCmEnrollmentPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; + } + + /** + * Parse the location from OrganizationLocationCmEnrollment resource. + * + * @param {string} organizationLocationCmEnrollmentName + * A fully-qualified path representing organization_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { + return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + + /** + * Return a fully-qualified organizationLocationFindingSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ + organization: organization, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from OrganizationLocationFindingSummaries resource. + * + * @param {string} organizationLocationFindingSummariesName + * A fully-qualified path representing organization_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { + return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ + organization: organization, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. + * + * @param {string} organizationLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified organizationLocationFrameworkAudits resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ + organization: organization, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. + * + * @param {string} organizationLocationFrameworkAuditsName + * A fully-qualified path representing organization_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { + return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. + * + * @param {string} organizationLocationFrameworkComplianceReportsName + * A fully-qualified path representing organization_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ + organization: organization, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. + * + * @param {string} organizationLocationFrameworkComplianceSummariesName + * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + + /** + * Return a fully-qualified projectLocationCmEnrollment resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + projectLocationCmEnrollmentPath(project:string,location:string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; + } + + /** + * Parse the location from ProjectLocationCmEnrollment resource. + * + * @param {string} projectLocationCmEnrollmentName + * A fully-qualified path representing project_location_cmEnrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { + return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; + } + + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + + /** + * Return a fully-qualified projectLocationFindingSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} finding_summary + * @returns {string} Resource name string. + */ + projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ + project: project, + location: location, + finding_summary: findingSummary, + }); + } + + /** + * Parse the project from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; + } + + /** + * Parse the finding_summary from ProjectLocationFindingSummaries resource. + * + * @param {string} projectLocationFindingSummariesName + * A fully-qualified path representing project_location_findingSummaries resource. + * @returns {string} A string representing the finding_summary. + */ + matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { + return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} generate_framework_audit_scope_report_response + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ + project: project, + location: location, + generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; + } + + /** + * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. + * + * @param {string} projectLocationFrameworkAuditScopeReportsName + * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. + * @returns {string} A string representing the generate_framework_audit_scope_report_response. + */ + matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; + } + + /** + * Return a fully-qualified projectLocationFrameworkAudits resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_audit + * @returns {string} Resource name string. + */ + projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ + project: project, + location: location, + framework_audit: frameworkAudit, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; + } + + /** + * Parse the framework_audit from ProjectLocationFrameworkAudits resource. + * + * @param {string} projectLocationFrameworkAuditsName + * A fully-qualified path representing project_location_frameworkAudits resource. + * @returns {string} A string representing the framework_audit. + */ + matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { + return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @param {string} control_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + control_compliance_summary: controlComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; + } + + /** + * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName + * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. + * @returns {string} A string representing the control_compliance_summary. + */ + matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_report + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ + project: project, + location: location, + framework_compliance_report: frameworkComplianceReport, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; + } + + /** + * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. + * + * @param {string} projectLocationFrameworkComplianceReportsName + * A fully-qualified path representing project_location_frameworkComplianceReports resource. + * @returns {string} A string representing the framework_compliance_report. + */ + matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; + } + + /** + * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_compliance_summary + * @returns {string} Resource name string. + */ + projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ + project: project, + location: location, + framework_compliance_summary: frameworkComplianceSummary, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; + } + + /** + * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. + * + * @param {string} projectLocationFrameworkComplianceSummariesName + * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. + * @returns {string} A string representing the framework_compliance_summary. + */ + matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { + return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; + } + + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.monitoringStub && !this._terminated) { + return this.monitoringStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json new file mode 100644 index 00000000000..a68a224ef1d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json @@ -0,0 +1,63 @@ +{ + "interfaces": { + "google.cloud.cloudsecuritycompliance.v1.Monitoring": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListFrameworkComplianceSummaries": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListFindingSummaries": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchFrameworkComplianceReport": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListControlComplianceSummaries": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "AggregateFrameworkComplianceReport": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json new file mode 100644 index 00000000000..465d3b67d8b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", + "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" +] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..6fb1aa753fa --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js @@ -0,0 +1,31 @@ +// Copyright 2026 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 cloudsecuritycompliance = require('@google-cloud/cloudsecuritycompliance'); + +function main() { + const auditClient = new cloudsecuritycompliance.AuditClient(); + const cmEnrollmentServiceClient = new cloudsecuritycompliance.CmEnrollmentServiceClient(); + const configClient = new cloudsecuritycompliance.ConfigClient(); + const deploymentClient = new cloudsecuritycompliance.DeploymentClient(); + const monitoringClient = new cloudsecuritycompliance.MonitoringClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..960d47e3e54 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,56 @@ +// Copyright 2026 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 {AuditClient, CmEnrollmentServiceClient, ConfigClient, DeploymentClient, MonitoringClient} from '@google-cloud/cloudsecuritycompliance'; + +// check that the client class type name can be used +function doStuffWithAuditClient(client: AuditClient) { + client.close(); +} +function doStuffWithCmEnrollmentServiceClient(client: CmEnrollmentServiceClient) { + client.close(); +} +function doStuffWithConfigClient(client: ConfigClient) { + client.close(); +} +function doStuffWithDeploymentClient(client: DeploymentClient) { + client.close(); +} +function doStuffWithMonitoringClient(client: MonitoringClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const auditClient = new AuditClient(); + doStuffWithAuditClient(auditClient); + // check that the client instance can be created + const cmEnrollmentServiceClient = new CmEnrollmentServiceClient(); + doStuffWithCmEnrollmentServiceClient(cmEnrollmentServiceClient); + // check that the client instance can be created + const configClient = new ConfigClient(); + doStuffWithConfigClient(configClient); + // check that the client instance can be created + const deploymentClient = new DeploymentClient(); + doStuffWithDeploymentClient(deploymentClient); + // check that the client instance can be created + const monitoringClient = new MonitoringClient(); + doStuffWithMonitoringClient(monitoringClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts new file mode 100644 index 00000000000..f66069aa394 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts new file mode 100644 index 00000000000..731fc0c5c8c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts @@ -0,0 +1,2680 @@ +// Copyright 2026 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 auditModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, 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) + .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.AuditClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new auditModule.v1.AuditClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new auditModule.v1.AuditClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = auditModule.v1.AuditClient.servicePath; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = auditModule.v1.AuditClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new auditModule.v1.AuditClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new auditModule.v1.AuditClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new auditModule.v1.AuditClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new auditModule.v1.AuditClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new auditModule.v1.AuditClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = auditModule.v1.AuditClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new auditModule.v1.AuditClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new auditModule.v1.AuditClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.auditStub, undefined); + await client.initialize(); + assert(client.auditStub); + }); + + it('has close method for the initialized client', done => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.auditStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.auditStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new auditModule.v1.AuditClient({ + 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 auditModule.v1.AuditClient({ + 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('generateFrameworkAuditScopeReport', () => { + it('invokes generateFrameworkAuditScopeReport without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse() + ); + client.innerApiCalls.generateFrameworkAuditScopeReport = stubSimpleCall(expectedResponse); + const [response] = await client.generateFrameworkAuditScopeReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateFrameworkAuditScopeReport without error using callback', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse() + ); + client.innerApiCalls.generateFrameworkAuditScopeReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateFrameworkAuditScopeReport( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateFrameworkAuditScopeReport with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); + request.scope = defaultValue1; + const expectedHeaderRequestParams = `scope=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateFrameworkAuditScopeReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.generateFrameworkAuditScopeReport(request), expectedError); + const actualRequest = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateFrameworkAuditScopeReport with closed client', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); + request.scope = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.generateFrameworkAuditScopeReport(request), expectedError); + }); + }); + + describe('getFrameworkAudit', () => { + it('invokes getFrameworkAudit without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit() + ); + client.innerApiCalls.getFrameworkAudit = stubSimpleCall(expectedResponse); + const [response] = await client.getFrameworkAudit(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFrameworkAudit as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkAudit as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFrameworkAudit without error using callback', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit() + ); + client.innerApiCalls.getFrameworkAudit = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFrameworkAudit( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFrameworkAudit as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkAudit as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFrameworkAudit with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFrameworkAudit = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getFrameworkAudit(request), expectedError); + const actualRequest = (client.innerApiCalls.getFrameworkAudit as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkAudit as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFrameworkAudit with closed client', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getFrameworkAudit(request), expectedError); + }); + }); + + describe('createFrameworkAudit', () => { + it('invokes createFrameworkAudit without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFrameworkAudit = stubLongRunningCall(expectedResponse); + const [operation] = await client.createFrameworkAudit(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFrameworkAudit without error using callback', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFrameworkAudit = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFrameworkAudit( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFrameworkAudit with call error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFrameworkAudit = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createFrameworkAudit(request), expectedError); + const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFrameworkAudit with LRO error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFrameworkAudit = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createFrameworkAudit(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateFrameworkAuditProgress without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateFrameworkAuditProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateFrameworkAuditProgress with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateFrameworkAuditProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listFrameworkAudits', () => { + it('invokes listFrameworkAudits without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + ]; + client.innerApiCalls.listFrameworkAudits = stubSimpleCall(expectedResponse); + const [response] = await client.listFrameworkAudits(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworkAudits as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkAudits as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkAudits without error using callback', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + ]; + client.innerApiCalls.listFrameworkAudits = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFrameworkAudits( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworkAudits as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkAudits as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkAudits with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFrameworkAudits = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFrameworkAudits(request), expectedError); + const actualRequest = (client.innerApiCalls.listFrameworkAudits as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkAudits as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkAuditsStream without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + ]; + client.descriptors.page.listFrameworkAudits.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFrameworkAuditsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) => { + 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.listFrameworkAudits.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworkAudits, request)); + assert( + (client.descriptors.page.listFrameworkAudits.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFrameworkAuditsStream with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworkAudits.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFrameworkAuditsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFrameworkAudits.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworkAudits, request)); + assert( + (client.descriptors.page.listFrameworkAudits.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworkAudits without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), + ]; + client.descriptors.page.listFrameworkAudits.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[] = []; + const iterable = client.listFrameworkAuditsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworkAudits with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworkAudits.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFrameworkAuditsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('folderLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFindingSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFindingSummariesPath', () => { + const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFindingSummariesName', () => { + const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFindingSummariesName', () => { + const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportsPath', () => { + const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/organizationLocationCmEnrollment"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCmEnrollmentPath', () => { + const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFindingSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFindingSummariesPath', () => { + const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditScopeReportsPath', () => { + const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditsPath', () => { + const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportsPath', () => { + const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/projectLocationCmEnrollment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCmEnrollmentPath', () => { + const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCmEnrollmentName', () => { + const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCmEnrollmentName', () => { + const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFindingSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFindingSummariesPath', () => { + const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFindingSummariesName', () => { + const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFindingSummariesName', () => { + const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditScopeReportsPath', () => { + const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAudits"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditsPath', () => { + const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportsPath', () => { + const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts new file mode 100644 index 00000000000..7a0c86fb914 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts @@ -0,0 +1,1919 @@ +// Copyright 2026 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 cmenrollmentserviceModule from '../src'; + +import {protobuf, 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) + .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 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.CmEnrollmentServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = cmenrollmentserviceModule.v1.CmEnrollmentServiceClient.servicePath; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = cmenrollmentserviceModule.v1.CmEnrollmentServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = cmenrollmentserviceModule.v1.CmEnrollmentServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cmEnrollmentServiceStub, undefined); + await client.initialize(); + assert(client.cmEnrollmentServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.cmEnrollmentServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cmEnrollmentServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + 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('updateCmEnrollment', () => { + it('invokes updateCmEnrollment without error', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() + ); + request.cmEnrollment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); + request.cmEnrollment.name = defaultValue1; + const expectedHeaderRequestParams = `cm_enrollment.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CmEnrollment() + ); + client.innerApiCalls.updateCmEnrollment = stubSimpleCall(expectedResponse); + const [response] = await client.updateCmEnrollment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCmEnrollment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCmEnrollment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCmEnrollment without error using callback', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() + ); + request.cmEnrollment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); + request.cmEnrollment.name = defaultValue1; + const expectedHeaderRequestParams = `cm_enrollment.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CmEnrollment() + ); + client.innerApiCalls.updateCmEnrollment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCmEnrollment( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCmEnrollment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCmEnrollment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCmEnrollment with error', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() + ); + request.cmEnrollment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); + request.cmEnrollment.name = defaultValue1; + const expectedHeaderRequestParams = `cm_enrollment.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCmEnrollment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateCmEnrollment(request), expectedError); + const actualRequest = (client.innerApiCalls.updateCmEnrollment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCmEnrollment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCmEnrollment with closed client', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() + ); + request.cmEnrollment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); + request.cmEnrollment.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateCmEnrollment(request), expectedError); + }); + }); + + describe('calculateEffectiveCmEnrollment', () => { + it('invokes calculateEffectiveCmEnrollment without error', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse() + ); + client.innerApiCalls.calculateEffectiveCmEnrollment = stubSimpleCall(expectedResponse); + const [response] = await client.calculateEffectiveCmEnrollment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateEffectiveCmEnrollment without error using callback', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse() + ); + client.innerApiCalls.calculateEffectiveCmEnrollment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.calculateEffectiveCmEnrollment( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateEffectiveCmEnrollment with error', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.calculateEffectiveCmEnrollment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.calculateEffectiveCmEnrollment(request), expectedError); + const actualRequest = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateEffectiveCmEnrollment with closed client', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.calculateEffectiveCmEnrollment(request), expectedError); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('folderLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFindingSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFindingSummariesPath', () => { + const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFindingSummariesName', () => { + const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFindingSummariesName', () => { + const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportsPath', () => { + const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/organizationLocationCmEnrollment"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCmEnrollmentPath', () => { + const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFindingSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFindingSummariesPath', () => { + const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditScopeReportsPath', () => { + const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditsPath', () => { + const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportsPath', () => { + const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/projectLocationCmEnrollment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCmEnrollmentPath', () => { + const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCmEnrollmentName', () => { + const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCmEnrollmentName', () => { + const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFindingSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFindingSummariesPath', () => { + const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFindingSummariesName', () => { + const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFindingSummariesName', () => { + const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditScopeReportsPath', () => { + const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAudits"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditsPath', () => { + const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportsPath', () => { + const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts new file mode 100644 index 00000000000..cdad6d13971 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts @@ -0,0 +1,3156 @@ +// Copyright 2026 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 configModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, 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) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ConfigClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new configModule.v1.ConfigClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new configModule.v1.ConfigClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = configModule.v1.ConfigClient.servicePath; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = configModule.v1.ConfigClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new configModule.v1.ConfigClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new configModule.v1.ConfigClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new configModule.v1.ConfigClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new configModule.v1.ConfigClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new configModule.v1.ConfigClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = configModule.v1.ConfigClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new configModule.v1.ConfigClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new configModule.v1.ConfigClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configStub, undefined); + await client.initialize(); + assert(client.configStub); + }); + + it('has close method for the initialized client', done => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.configStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.configStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new configModule.v1.ConfigClient({ + 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 configModule.v1.ConfigClient({ + 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('getFramework', () => { + it('invokes getFramework without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.Framework() + ); + client.innerApiCalls.getFramework = stubSimpleCall(expectedResponse); + const [response] = await client.getFramework(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFramework without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.Framework() + ); + client.innerApiCalls.getFramework = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFramework( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFramework with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFramework = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getFramework(request), expectedError); + const actualRequest = (client.innerApiCalls.getFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFramework with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getFramework(request), expectedError); + }); + }); + + describe('createFramework', () => { + it('invokes createFramework without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.Framework() + ); + client.innerApiCalls.createFramework = stubSimpleCall(expectedResponse); + const [response] = await client.createFramework(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFramework without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.Framework() + ); + client.innerApiCalls.createFramework = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFramework( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFramework with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFramework = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createFramework(request), expectedError); + const actualRequest = (client.innerApiCalls.createFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFramework with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createFramework(request), expectedError); + }); + }); + + describe('updateFramework', () => { + it('invokes updateFramework without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() + ); + request.framework ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); + request.framework.name = defaultValue1; + const expectedHeaderRequestParams = `framework.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.Framework() + ); + client.innerApiCalls.updateFramework = stubSimpleCall(expectedResponse); + const [response] = await client.updateFramework(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFramework without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() + ); + request.framework ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); + request.framework.name = defaultValue1; + const expectedHeaderRequestParams = `framework.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.Framework() + ); + client.innerApiCalls.updateFramework = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFramework( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFramework with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() + ); + request.framework ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); + request.framework.name = defaultValue1; + const expectedHeaderRequestParams = `framework.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFramework = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateFramework(request), expectedError); + const actualRequest = (client.innerApiCalls.updateFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFramework with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() + ); + request.framework ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); + request.framework.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateFramework(request), expectedError); + }); + }); + + describe('deleteFramework', () => { + it('invokes deleteFramework without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFramework = stubSimpleCall(expectedResponse); + const [response] = await client.deleteFramework(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFramework without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFramework = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFramework( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFramework with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFramework = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteFramework(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteFramework as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFramework as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFramework with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteFramework(request), expectedError); + }); + }); + + describe('getCloudControl', () => { + it('invokes getCloudControl without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() + ); + client.innerApiCalls.getCloudControl = stubSimpleCall(expectedResponse); + const [response] = await client.getCloudControl(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCloudControl without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() + ); + client.innerApiCalls.getCloudControl = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCloudControl( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCloudControl with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCloudControl = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCloudControl(request), expectedError); + const actualRequest = (client.innerApiCalls.getCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCloudControl with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getCloudControl(request), expectedError); + }); + }); + + describe('createCloudControl', () => { + it('invokes createCloudControl without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() + ); + client.innerApiCalls.createCloudControl = stubSimpleCall(expectedResponse); + const [response] = await client.createCloudControl(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCloudControl without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() + ); + client.innerApiCalls.createCloudControl = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCloudControl( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCloudControl with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCloudControl = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createCloudControl(request), expectedError); + const actualRequest = (client.innerApiCalls.createCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCloudControl with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createCloudControl(request), expectedError); + }); + }); + + describe('updateCloudControl', () => { + it('invokes updateCloudControl without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() + ); + request.cloudControl ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); + request.cloudControl.name = defaultValue1; + const expectedHeaderRequestParams = `cloud_control.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() + ); + client.innerApiCalls.updateCloudControl = stubSimpleCall(expectedResponse); + const [response] = await client.updateCloudControl(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCloudControl without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() + ); + request.cloudControl ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); + request.cloudControl.name = defaultValue1; + const expectedHeaderRequestParams = `cloud_control.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() + ); + client.innerApiCalls.updateCloudControl = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCloudControl( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCloudControl with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() + ); + request.cloudControl ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); + request.cloudControl.name = defaultValue1; + const expectedHeaderRequestParams = `cloud_control.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCloudControl = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateCloudControl(request), expectedError); + const actualRequest = (client.innerApiCalls.updateCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCloudControl with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() + ); + request.cloudControl ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); + request.cloudControl.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateCloudControl(request), expectedError); + }); + }); + + describe('deleteCloudControl', () => { + it('invokes deleteCloudControl without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteCloudControl = stubSimpleCall(expectedResponse); + const [response] = await client.deleteCloudControl(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCloudControl without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteCloudControl = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteCloudControl( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCloudControl with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCloudControl = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteCloudControl(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteCloudControl as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteCloudControl as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCloudControl with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteCloudControl(request), expectedError); + }); + }); + + describe('listFrameworks', () => { + it('invokes listFrameworks without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + ]; + client.innerApiCalls.listFrameworks = stubSimpleCall(expectedResponse); + const [response] = await client.listFrameworks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworks without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + ]; + client.innerApiCalls.listFrameworks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFrameworks( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworks with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFrameworks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFrameworks(request), expectedError); + const actualRequest = (client.innerApiCalls.listFrameworks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworksStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + ]; + client.descriptors.page.listFrameworks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFrameworksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.Framework[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.Framework) => { + 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.listFrameworks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworks, request)); + assert( + (client.descriptors.page.listFrameworks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFrameworksStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFrameworksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.Framework[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.Framework) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFrameworks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworks, request)); + assert( + (client.descriptors.page.listFrameworks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworks without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), + ]; + client.descriptors.page.listFrameworks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFramework[] = []; + const iterable = client.listFrameworksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworks with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFrameworksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFramework[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCloudControls', () => { + it('invokes listCloudControls without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + ]; + client.innerApiCalls.listCloudControls = stubSimpleCall(expectedResponse); + const [response] = await client.listCloudControls(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCloudControls as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCloudControls as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCloudControls without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + ]; + client.innerApiCalls.listCloudControls = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCloudControls( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCloudControls as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCloudControls as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCloudControls with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCloudControls = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listCloudControls(request), expectedError); + const actualRequest = (client.innerApiCalls.listCloudControls as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCloudControls as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCloudControlsStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + ]; + client.descriptors.page.listCloudControls.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listCloudControlsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl) => { + 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.listCloudControls.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCloudControls, request)); + assert( + (client.descriptors.page.listCloudControls.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCloudControlsStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCloudControls.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listCloudControlsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listCloudControls.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCloudControls, request)); + assert( + (client.descriptors.page.listCloudControls.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCloudControls without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), + ]; + client.descriptors.page.listCloudControls.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[] = []; + const iterable = client.listCloudControlsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCloudControls with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCloudControls.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCloudControlsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('folderLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFindingSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFindingSummariesPath', () => { + const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFindingSummariesName', () => { + const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFindingSummariesName', () => { + const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportsPath', () => { + const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organization', async () => { + const fakePath = "/rendered/path/organization"; + const expectedParameters = { + organization: "organizationValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath("organizationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocation', async () => { + const fakePath = "/rendered/path/organizationLocation"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationPath', () => { + const result = client.organizationLocationPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationName', () => { + const result = client.matchOrganizationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationName', () => { + const result = client.matchLocationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/organizationLocationCmEnrollment"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCmEnrollmentPath', () => { + const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFindingSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFindingSummariesPath', () => { + const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditScopeReportsPath', () => { + const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditsPath', () => { + const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportsPath', () => { + const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/projectLocationCmEnrollment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCmEnrollmentPath', () => { + const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCmEnrollmentName', () => { + const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCmEnrollmentName', () => { + const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFindingSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFindingSummariesPath', () => { + const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFindingSummariesName', () => { + const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFindingSummariesName', () => { + const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditScopeReportsPath', () => { + const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAudits"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditsPath', () => { + const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportsPath', () => { + const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts new file mode 100644 index 00000000000..d3887b2ab37 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts @@ -0,0 +1,3079 @@ +// Copyright 2026 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 deploymentModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, 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) + .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.DeploymentClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new deploymentModule.v1.DeploymentClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new deploymentModule.v1.DeploymentClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = deploymentModule.v1.DeploymentClient.servicePath; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = deploymentModule.v1.DeploymentClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new deploymentModule.v1.DeploymentClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new deploymentModule.v1.DeploymentClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new deploymentModule.v1.DeploymentClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new deploymentModule.v1.DeploymentClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new deploymentModule.v1.DeploymentClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = deploymentModule.v1.DeploymentClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new deploymentModule.v1.DeploymentClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new deploymentModule.v1.DeploymentClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deploymentStub, undefined); + await client.initialize(); + assert(client.deploymentStub); + }); + + it('has close method for the initialized client', done => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.deploymentStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.deploymentStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new deploymentModule.v1.DeploymentClient({ + 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 deploymentModule.v1.DeploymentClient({ + 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('getFrameworkDeployment', () => { + it('invokes getFrameworkDeployment without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment() + ); + client.innerApiCalls.getFrameworkDeployment = stubSimpleCall(expectedResponse); + const [response] = await client.getFrameworkDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFrameworkDeployment without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment() + ); + client.innerApiCalls.getFrameworkDeployment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFrameworkDeployment( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFrameworkDeployment with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFrameworkDeployment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getFrameworkDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.getFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFrameworkDeployment with closed client', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getFrameworkDeployment(request), expectedError); + }); + }); + + describe('getCloudControlDeployment', () => { + it('invokes getCloudControlDeployment without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment() + ); + client.innerApiCalls.getCloudControlDeployment = stubSimpleCall(expectedResponse); + const [response] = await client.getCloudControlDeployment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCloudControlDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCloudControlDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCloudControlDeployment without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment() + ); + client.innerApiCalls.getCloudControlDeployment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCloudControlDeployment( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getCloudControlDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCloudControlDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCloudControlDeployment with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCloudControlDeployment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCloudControlDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.getCloudControlDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getCloudControlDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCloudControlDeployment with closed client', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getCloudControlDeployment(request), expectedError); + }); + }); + + describe('createFrameworkDeployment', () => { + it('invokes createFrameworkDeployment without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFrameworkDeployment = stubLongRunningCall(expectedResponse); + const [operation] = await client.createFrameworkDeployment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFrameworkDeployment without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFrameworkDeployment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFrameworkDeployment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFrameworkDeployment with call error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFrameworkDeployment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createFrameworkDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFrameworkDeployment with LRO error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFrameworkDeployment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createFrameworkDeployment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateFrameworkDeploymentProgress without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkCreateFrameworkDeploymentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateFrameworkDeploymentProgress with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateFrameworkDeploymentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteFrameworkDeployment', () => { + it('invokes deleteFrameworkDeployment without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFrameworkDeployment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFrameworkDeployment without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFrameworkDeployment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFrameworkDeployment with call error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteFrameworkDeployment(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFrameworkDeployment with LRO error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteFrameworkDeployment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFrameworkDeploymentProgress without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkDeleteFrameworkDeploymentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFrameworkDeploymentProgress with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteFrameworkDeploymentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listFrameworkDeployments', () => { + it('invokes listFrameworkDeployments without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + ]; + client.innerApiCalls.listFrameworkDeployments = stubSimpleCall(expectedResponse); + const [response] = await client.listFrameworkDeployments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworkDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkDeployments without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + ]; + client.innerApiCalls.listFrameworkDeployments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFrameworkDeployments( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworkDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkDeployments with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFrameworkDeployments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFrameworkDeployments(request), expectedError); + const actualRequest = (client.innerApiCalls.listFrameworkDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkDeploymentsStream without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + ]; + client.descriptors.page.listFrameworkDeployments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFrameworkDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => { + 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.listFrameworkDeployments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworkDeployments, request)); + assert( + (client.descriptors.page.listFrameworkDeployments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFrameworkDeploymentsStream with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworkDeployments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFrameworkDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFrameworkDeployments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworkDeployments, request)); + assert( + (client.descriptors.page.listFrameworkDeployments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworkDeployments without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), + ]; + client.descriptors.page.listFrameworkDeployments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[] = []; + const iterable = client.listFrameworkDeploymentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworkDeployments with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworkDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFrameworkDeploymentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCloudControlDeployments', () => { + it('invokes listCloudControlDeployments without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + ]; + client.innerApiCalls.listCloudControlDeployments = stubSimpleCall(expectedResponse); + const [response] = await client.listCloudControlDeployments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCloudControlDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCloudControlDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCloudControlDeployments without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + ]; + client.innerApiCalls.listCloudControlDeployments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCloudControlDeployments( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listCloudControlDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCloudControlDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCloudControlDeployments with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCloudControlDeployments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listCloudControlDeployments(request), expectedError); + const actualRequest = (client.innerApiCalls.listCloudControlDeployments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listCloudControlDeployments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCloudControlDeploymentsStream without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + ]; + client.descriptors.page.listCloudControlDeployments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listCloudControlDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => { + 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.listCloudControlDeployments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCloudControlDeployments, request)); + assert( + (client.descriptors.page.listCloudControlDeployments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCloudControlDeploymentsStream with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCloudControlDeployments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listCloudControlDeploymentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listCloudControlDeployments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listCloudControlDeployments, request)); + assert( + (client.descriptors.page.listCloudControlDeployments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCloudControlDeployments without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), + ]; + client.descriptors.page.listCloudControlDeployments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[] = []; + const iterable = client.listCloudControlDeploymentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCloudControlDeployments with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listCloudControlDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCloudControlDeploymentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('folderLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFindingSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFindingSummariesPath', () => { + const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFindingSummariesName', () => { + const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFindingSummariesName', () => { + const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportsPath', () => { + const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organization', async () => { + const fakePath = "/rendered/path/organization"; + const expectedParameters = { + organization: "organizationValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath("organizationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocation', async () => { + const fakePath = "/rendered/path/organizationLocation"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationPath', () => { + const result = client.organizationLocationPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationName', () => { + const result = client.matchOrganizationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationName', () => { + const result = client.matchLocationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/organizationLocationCmEnrollment"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCmEnrollmentPath', () => { + const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFindingSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFindingSummariesPath', () => { + const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditScopeReportsPath', () => { + const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditsPath', () => { + const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportsPath', () => { + const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/projectLocationCmEnrollment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCmEnrollmentPath', () => { + const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCmEnrollmentName', () => { + const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCmEnrollmentName', () => { + const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFindingSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFindingSummariesPath', () => { + const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFindingSummariesName', () => { + const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFindingSummariesName', () => { + const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditScopeReportsPath', () => { + const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAudits"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditsPath', () => { + const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportsPath', () => { + const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts new file mode 100644 index 00000000000..3e72919f304 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts @@ -0,0 +1,2745 @@ +// Copyright 2026 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 monitoringModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, 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) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.MonitoringClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new monitoringModule.v1.MonitoringClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new monitoringModule.v1.MonitoringClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = monitoringModule.v1.MonitoringClient.servicePath; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = monitoringModule.v1.MonitoringClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new monitoringModule.v1.MonitoringClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new monitoringModule.v1.MonitoringClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new monitoringModule.v1.MonitoringClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new monitoringModule.v1.MonitoringClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new monitoringModule.v1.MonitoringClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = monitoringModule.v1.MonitoringClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new monitoringModule.v1.MonitoringClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new monitoringModule.v1.MonitoringClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.monitoringStub, undefined); + await client.initialize(); + assert(client.monitoringStub); + }); + + it('has close method for the initialized client', done => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.monitoringStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.monitoringStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new monitoringModule.v1.MonitoringClient({ + 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 monitoringModule.v1.MonitoringClient({ + 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('fetchFrameworkComplianceReport', () => { + it('invokes fetchFrameworkComplianceReport without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport() + ); + client.innerApiCalls.fetchFrameworkComplianceReport = stubSimpleCall(expectedResponse); + const [response] = await client.fetchFrameworkComplianceReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFrameworkComplianceReport without error using callback', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport() + ); + client.innerApiCalls.fetchFrameworkComplianceReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchFrameworkComplianceReport( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFrameworkComplianceReport with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchFrameworkComplianceReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.fetchFrameworkComplianceReport(request), expectedError); + const actualRequest = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchFrameworkComplianceReport with closed client', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.fetchFrameworkComplianceReport(request), expectedError); + }); + }); + + describe('aggregateFrameworkComplianceReport', () => { + it('invokes aggregateFrameworkComplianceReport without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse() + ); + client.innerApiCalls.aggregateFrameworkComplianceReport = stubSimpleCall(expectedResponse); + const [response] = await client.aggregateFrameworkComplianceReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes aggregateFrameworkComplianceReport without error using callback', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse() + ); + client.innerApiCalls.aggregateFrameworkComplianceReport = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.aggregateFrameworkComplianceReport( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes aggregateFrameworkComplianceReport with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.aggregateFrameworkComplianceReport = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.aggregateFrameworkComplianceReport(request), expectedError); + const actualRequest = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes aggregateFrameworkComplianceReport with closed client', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.aggregateFrameworkComplianceReport(request), expectedError); + }); + }); + + describe('listFrameworkComplianceSummaries', () => { + it('invokes listFrameworkComplianceSummaries without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + ]; + client.innerApiCalls.listFrameworkComplianceSummaries = stubSimpleCall(expectedResponse); + const [response] = await client.listFrameworkComplianceSummaries(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkComplianceSummaries without error using callback', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + ]; + client.innerApiCalls.listFrameworkComplianceSummaries = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFrameworkComplianceSummaries( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkComplianceSummaries with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFrameworkComplianceSummaries = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFrameworkComplianceSummaries(request), expectedError); + const actualRequest = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFrameworkComplianceSummariesStream without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + ]; + client.descriptors.page.listFrameworkComplianceSummaries.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFrameworkComplianceSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary) => { + 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.listFrameworkComplianceSummaries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworkComplianceSummaries, request)); + assert( + (client.descriptors.page.listFrameworkComplianceSummaries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFrameworkComplianceSummariesStream with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworkComplianceSummaries.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFrameworkComplianceSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFrameworkComplianceSummaries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFrameworkComplianceSummaries, request)); + assert( + (client.descriptors.page.listFrameworkComplianceSummaries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworkComplianceSummaries without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), + ]; + client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[] = []; + const iterable = client.listFrameworkComplianceSummariesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFrameworkComplianceSummaries with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFrameworkComplianceSummariesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listFindingSummaries', () => { + it('invokes listFindingSummaries without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + ]; + client.innerApiCalls.listFindingSummaries = stubSimpleCall(expectedResponse); + const [response] = await client.listFindingSummaries(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFindingSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFindingSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFindingSummaries without error using callback', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + ]; + client.innerApiCalls.listFindingSummaries = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFindingSummaries( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFindingSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFindingSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFindingSummaries with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFindingSummaries = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFindingSummaries(request), expectedError); + const actualRequest = (client.innerApiCalls.listFindingSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFindingSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFindingSummariesStream without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + ]; + client.descriptors.page.listFindingSummaries.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFindingSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary) => { + 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.listFindingSummaries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFindingSummaries, request)); + assert( + (client.descriptors.page.listFindingSummaries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFindingSummariesStream with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFindingSummaries.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFindingSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFindingSummaries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFindingSummaries, request)); + assert( + (client.descriptors.page.listFindingSummaries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFindingSummaries without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), + ]; + client.descriptors.page.listFindingSummaries.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[] = []; + const iterable = client.listFindingSummariesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFindingSummaries with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFindingSummaries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFindingSummariesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listControlComplianceSummaries', () => { + it('invokes listControlComplianceSummaries without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + ]; + client.innerApiCalls.listControlComplianceSummaries = stubSimpleCall(expectedResponse); + const [response] = await client.listControlComplianceSummaries(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listControlComplianceSummaries without error using callback', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + ]; + client.innerApiCalls.listControlComplianceSummaries = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listControlComplianceSummaries( + request, + (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listControlComplianceSummaries with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listControlComplianceSummaries = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listControlComplianceSummaries(request), expectedError); + const actualRequest = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listControlComplianceSummariesStream without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + ]; + client.descriptors.page.listControlComplianceSummaries.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listControlComplianceSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary) => { + 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.listControlComplianceSummaries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listControlComplianceSummaries, request)); + assert( + (client.descriptors.page.listControlComplianceSummaries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listControlComplianceSummariesStream with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listControlComplianceSummaries.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listControlComplianceSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary[] = []; + stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listControlComplianceSummaries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listControlComplianceSummaries, request)); + assert( + (client.descriptors.page.listControlComplianceSummaries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listControlComplianceSummaries without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), + ]; + client.descriptors.page.listControlComplianceSummaries.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[] = []; + const iterable = client.listControlComplianceSummariesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listControlComplianceSummaries with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listControlComplianceSummaries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listControlComplianceSummariesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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 monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('folderLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFindingSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFindingSummariesPath', () => { + const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFindingSummariesName', () => { + const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFindingSummariesName', () => { + const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceReportsPath', () => { + const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationFrameworkComplianceSummariesPath', () => { + const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/organizationLocationCmEnrollment"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationCmEnrollmentPath', () => { + const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { + const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFindingSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFindingSummariesPath', () => { + const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditScopeReportsPath', () => { + const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkAuditsPath', () => { + const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceReportsPath', () => { + const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkComplianceSummariesPath', () => { + const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCmEnrollment', async () => { + const fakePath = "/rendered/path/projectLocationCmEnrollment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCmEnrollmentPath', () => { + const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCmEnrollmentName', () => { + const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCmEnrollmentName', () => { + const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFindingSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFindingSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + finding_summary: "findingSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFindingSummariesPath', () => { + const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFindingSummariesName', () => { + const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFindingSummariesName', () => { + const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { + const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); + assert.strictEqual(result, "findingSummaryValue"); + assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAuditScopeReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditScopeReportsPath', () => { + const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { + const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); + assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkAudits', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkAudits"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_audit: "frameworkAuditValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkAuditsPath', () => { + const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { + const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); + assert.strictEqual(result, "frameworkAuditValue"); + assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + control_compliance_summary: "controlComplianceSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { + const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); + assert.strictEqual(result, "controlComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceReports', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_report: "frameworkComplianceReportValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceReportsPath', () => { + const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { + const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); + assert.strictEqual(result, "frameworkComplianceReportValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkComplianceSummaries', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_compliance_summary: "frameworkComplianceSummaryValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkComplianceSummariesPath', () => { + const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { + const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); + assert.strictEqual(result, "frameworkComplianceSummaryValue"); + assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json new file mode 100644 index 00000000000..ca73e7bfc82 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js new file mode 100644 index 00000000000..cfaffcbff19 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'Audit', + filename: './audit.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 52eb84245d82670795df42e8c41e4c66d023172b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 22 Apr 2026 09:26:13 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-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 --- .../.eslintignore | 7 - .../.eslintrc.json | 4 - .../.gitignore | 14 - .../.jsdoc.js | 55 - .../.mocharc.js | 33 - .../.nycrc | 24 - .../.prettierignore | 6 - .../.prettierrc.js | 22 - .../README.md | 140 - .../cloudsecuritycompliance/v1/audit.proto | 512 - .../v1/cm_enrollment_service.proto | 159 - .../cloudsecuritycompliance/v1/common.proto | 810 - .../cloudsecuritycompliance/v1/config.proto | 456 - .../v1/deployment.proto | 620 - .../v1/monitoring.proto | 670 - .../protos/protos.d.ts | 19302 ------ .../protos/protos.js | 51390 ---------------- .../protos/protos.json | 5937 -- .../v1/audit.create_framework_audit.js | 78 - ...t.generate_framework_audit_scope_report.js | 75 - .../generated/v1/audit.get_framework_audit.js | 65 - .../v1/audit.list_framework_audits.js | 87 - ...rvice.calculate_effective_cm_enrollment.js | 65 - ...enrollment_service.update_cm_enrollment.js | 66 - .../v1/config.create_cloud_control.js | 76 - .../generated/v1/config.create_framework.js | 75 - .../v1/config.delete_cloud_control.js | 66 - .../generated/v1/config.delete_framework.js | 65 - .../generated/v1/config.get_cloud_control.js | 71 - .../generated/v1/config.get_framework.js | 71 - .../v1/config.list_cloud_controls.js | 82 - .../generated/v1/config.list_frameworks.js | 78 - .../v1/config.update_cloud_control.js | 76 - .../generated/v1/config.update_framework.js | 73 - .../deployment.create_framework_deployment.js | 77 - .../deployment.delete_framework_deployment.js | 76 - ...deployment.get_cloud_control_deployment.js | 65 - .../v1/deployment.get_framework_deployment.js | 65 - ...ployment.list_cloud_control_deployments.js | 90 - .../deployment.list_framework_deployments.js | 91 - ...g.aggregate_framework_compliance_report.js | 73 - ...oring.fetch_framework_compliance_report.js | 69 - ...oring.list_control_compliance_summaries.js | 81 - .../v1/monitoring.list_finding_summaries.js | 81 - ...ing.list_framework_compliance_summaries.js | 81 - ...ogle.cloud.cloudsecuritycompliance.v1.json | 1287 - .../src/index.ts | 35 - .../src/v1/audit_client.ts | 2798 - .../src/v1/audit_client_config.json | 58 - .../src/v1/audit_proto_list.json | 8 - .../src/v1/cm_enrollment_service_client.ts | 2106 - .../cm_enrollment_service_client_config.json | 48 - .../v1/cm_enrollment_service_proto_list.json | 8 - .../src/v1/config_client.ts | 3309 - .../src/v1/config_client_config.json | 88 - .../src/v1/config_proto_list.json | 8 - .../src/v1/deployment_client.ts | 3169 - .../src/v1/deployment_client_config.json | 68 - .../src/v1/deployment_proto_list.json | 8 - .../src/v1/gapic_metadata.json | 381 - .../src/v1/index.ts | 23 - .../src/v1/monitoring_client.ts | 2808 - .../src/v1/monitoring_client_config.json | 63 - .../src/v1/monitoring_proto_list.json | 8 - .../system-test/fixtures/sample/src/index.js | 31 - .../system-test/fixtures/sample/src/index.ts | 56 - .../system-test/install.ts | 49 - .../test/gapic_audit_v1.ts | 2680 - .../test/gapic_cm_enrollment_service_v1.ts | 1919 - .../test/gapic_config_v1.ts | 3156 - .../test/gapic_deployment_v1.ts | 3079 - .../test/gapic_monitoring_v1.ts | 2745 - .../tsconfig.json | 22 - .../webpack.config.js | 64 - .../.eslintrc.json | 3 +- .../.gitattributes | 0 .../CODE_OF_CONDUCT.md | 0 .../CONTRIBUTING.md | 0 .../LICENSE | 0 .../cloudsecuritycompliance/v1/common.proto | 201 +- .../cloudsecuritycompliance/v1/config.proto | 91 +- .../v1/deployment.proto | 69 +- .../v1/monitoring.proto | 44 +- .../protos/protos.d.ts | 336 +- .../protos/protos.js | 1112 +- .../protos/protos.json | 329 +- .../v1/config.create_cloud_control.js | 5 +- .../generated/v1/config.create_framework.js | 5 +- .../v1/config.delete_cloud_control.js | 7 +- .../generated/v1/config.delete_framework.js | 6 +- .../generated/v1/config.get_cloud_control.js | 7 +- .../generated/v1/config.get_framework.js | 7 +- .../v1/config.list_cloud_controls.js | 5 +- .../generated/v1/config.list_frameworks.js | 5 +- .../deployment.create_framework_deployment.js | 4 +- .../deployment.delete_framework_deployment.js | 4 +- ...deployment.get_cloud_control_deployment.js | 4 +- .../v1/deployment.get_framework_deployment.js | 4 +- ...ployment.list_cloud_control_deployments.js | 5 +- .../deployment.list_framework_deployments.js | 4 +- ...oring.fetch_framework_compliance_report.js | 4 + ...ing.list_framework_compliance_summaries.js | 4 + ...ogle.cloud.cloudsecuritycompliance.v1.json | 40 +- .../src/v1/audit_client.ts | 672 +- .../src/v1/cm_enrollment_service_client.ts | 612 +- .../src/v1/config_client.ts | 769 +- .../src/v1/deployment_client.ts | 741 +- .../src/v1/monitoring_client.ts | 672 +- .../system-test/install.ts | 2 +- .../test/gapic_audit_v1.ts | 572 +- .../test/gapic_cm_enrollment_service_v1.ts | 532 +- .../test/gapic_config_v1.ts | 600 +- .../test/gapic_deployment_v1.ts | 600 +- .../test/gapic_monitoring_v1.ts | 572 +- 114 files changed, 6861 insertions(+), 114049 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitignore delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.nycrc delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js rename {owl-bot-staging => packages}/google-cloud-cloudsecuritycompliance/.gitattributes (100%) rename {owl-bot-staging => packages}/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md (100%) rename {owl-bot-staging => packages}/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md (100%) rename {owl-bot-staging => packages}/google-cloud-cloudsecuritycompliance/LICENSE (100%) diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json deleted file mode 100644 index 3e8d97ccb39..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./node_modules/gts", - "root": true -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitignore b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.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/owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js deleted file mode 100644 index a760884c194..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2026 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 2026 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/cloudsecuritycompliance', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js deleted file mode 100644 index 5eb34e86c87..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2026 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. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -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/owl-bot-staging/google-cloud-cloudsecuritycompliance/.nycrc b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.nycrc deleted file mode 100644 index 81a95fc94b0..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore deleted file mode 100644 index 9340ad9b86d..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -**/node_modules -**/coverage -test/fixtures -build/ -docs/ -protos/ diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js deleted file mode 100644 index 7649ee3c254..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2026 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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md b/owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md deleted file mode 100644 index 3270631ef7d..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/README.md +++ /dev/null @@ -1,140 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "The comments you see below are used to generate those parts of the template in later states." -Google Cloud Platform logo - -# [Cloud Security Compliance API: Nodejs Client][homepage] - -This library is considered to be in **preview**. This means it is still a -work-in-progress and under active development. Any release is subject to -backwards-incompatible changes at any time. - -[![npm version](https://img.shields.io/npm/v/@google-cloud/cloudsecuritycompliance.svg)](https://www.npmjs.org/package/@google-cloud/cloudsecuritycompliance) - -Cloud Security Compliance API client for Node.js - -[//]: # "partials.introduction" - -A comprehensive list of changes in each version may be found in -[the CHANGELOG][homepage_changelog]. - -* [Cloud Security Compliance API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/cloudsecuritycompliance/latest) -* [Cloud Security Compliance API Documentation](https://cloud.google.com/security-command-center/docs/compliance-manager-overview) - -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 Cloud Security Compliance API API][enable_api]. -1. [Set up authentication][auth] so you can access the - API from your local workstation. -### Installing the client library - -```bash -npm install @google-cloud/cloudsecuritycompliance -``` - -[//]: # "partials.body" - -## Samples - -Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. - -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| create framework audit | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js) | -| generate framework audit scope report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js) | -| get framework audit | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js) | -| list framework audits | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js) | -| calculate effective cm enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js) | -| update cm enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js) | -| create cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js) | -| create framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js) | -| delete cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js) | -| delete framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js) | -| get cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js) | -| get framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js) | -| list cloud controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js) | -| list frameworks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js) | -| update cloud control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js) | -| update framework | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js) | -| create framework deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js) | -| delete framework deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js) | -| get cloud control deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js) | -| get framework deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js) | -| list cloud control deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js) | -| list framework deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js) | -| aggregate framework compliance report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js) | -| fetch framework compliance report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js) | -| list control compliance summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js) | -| list finding summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js) | -| list framework compliance summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js) | -| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json) | - - -## Supported Node.js Versions - -Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). -Libraries are compatible with all current _active_ and _maintenance_ versions of -Node.js. -If you are using an end-of-life version of Node.js, we recommend that you update -as soon as possible to an actively supported LTS version. - -Google's client libraries support legacy versions of Node.js runtimes on a -best-efforts basis with the following warnings: - -* Legacy versions are not tested in continuous integration. -* Some security patches and features cannot be backported. -* Dependencies cannot be kept up-to-date. - -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. -For example, `npm install @google-cloud/cloudsecuritycompliance@legacy-8` installs client libraries -for versions compatible with Node.js 8. - -## Versioning - -This library follows [Semantic Versioning](http://semver.org/). - -More Information: [Google Cloud Platform Launch Stages][launch_stages] - -[launch_stages]: https://cloud.google.com/terms/launch-stages - -## Contributing - -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md). - -Please note that this `README.md` -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) -are generated from a central template. - -## License - -Apache Version 2.0 - -See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/LICENSE) - -[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=cloudsecuritycompliance.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local -[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/samples -[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance/CHANGELOG.md -[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-cloudsecuritycompliance diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto deleted file mode 100644 index b5877f19917..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/audit.proto +++ /dev/null @@ -1,512 +0,0 @@ -// Copyright 2025 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; -option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; -option java_multiple_files = true; -option java_outer_classname = "AuditProto"; -option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; -option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; -option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; - -// Service describing handlers for resources -service Audit { - option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Generates an audit scope report for a framework. - rpc GenerateFrameworkAuditScopeReport( - GenerateFrameworkAuditScopeReportRequest) - returns (GenerateFrameworkAuditScopeReportResponse) { - option (google.api.http) = { - post: "/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" - body: "*" - additional_bindings { - post: "/v1/{scope=projects/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" - body: "*" - } - additional_bindings { - post: "/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport" - body: "*" - } - }; - option (google.api.method_signature) = - "scope,report_format,compliance_framework"; - } - - // Creates an audit scope report for a framework. - rpc CreateFrameworkAudit(CreateFrameworkAuditRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=organizations/*/locations/*}/frameworkAudits" - body: "framework_audit" - additional_bindings { - post: "/v1/{parent=folders/*/locations/*}/frameworkAudits" - body: "framework_audit" - } - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/frameworkAudits" - body: "framework_audit" - } - }; - option (google.api.method_signature) = - "parent,framework_audit,framework_audit_id"; - option (google.longrunning.operation_info) = { - response_type: "FrameworkAudit" - metadata_type: "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - }; - } - - // Lists the framework audits for a given organization, folder, or project. - rpc ListFrameworkAudits(ListFrameworkAuditsRequest) - returns (ListFrameworkAuditsResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*}/frameworkAudits" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/frameworkAudits" - } - additional_bindings { - get: "/v1/{parent=projects/*/locations/*}/frameworkAudits" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details for a framework audit. - rpc GetFrameworkAudit(GetFrameworkAuditRequest) returns (FrameworkAudit) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/frameworkAudits/*}" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/frameworkAudits/*}" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/frameworkAudits/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// The state of compliance after evaluation is complete. -enum ComplianceState { - // Default value. This value is unused. - COMPLIANCE_STATE_UNSPECIFIED = 0; - - // The resource is compliant. - COMPLIANT = 1; - - // The resource has a violation. - VIOLATION = 2; - - // The resource requires manual review from you. - MANUAL_REVIEW_NEEDED = 3; - - // An error occurred while computing the resource status. - ERROR = 4; - - // The resource can't be audited. - AUDIT_NOT_SUPPORTED = 5; -} - -// The request message for [GenerateFrameworkAuditScopeReport][]. -message GenerateFrameworkAuditScopeReportRequest { - // The set of options for the audit scope report format. - enum Format { - // Default value. This value is unused. - FORMAT_UNSPECIFIED = 0; - - // The report format is the Open Document Format (ODF). - ODF = 1; - } - - // Required. The organization, folder or project for the audit report. - // - // Supported formats are the following: - // - // * `projects/{project_id}/locations/{location}` - // * `folders/{folder_id}/locations/{location}` - // * `organizations/{organization_id}/locations/{location}` - string scope = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The format that the scope report bytes is returned in. - Format report_format = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The compliance framework that the scope report is generated for. - string compliance_framework = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The response message for [GenerateFrameworkAuditScopeReport][]. -message GenerateFrameworkAuditScopeReportResponse { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/GenerateFrameworkAuditScopeReportResponse" - pattern: "projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}" - pattern: "organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}" - plural: "frameworkAuditScopeReports" - singular: "generateFrameworkAuditScopeReportResponse" - }; - - // The set of options that the audit scope report is exported in. - oneof audit_report { - // The audit scope report content in byte format. - bytes scope_report_contents = 3; - } - - // Identifier. The name of the audit report, in the format that was - // given in the request. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Required. The compliance framework that the audit scope report is generated - // for. - string compliance_framework = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Additional information for an audit operation. -message ReportSummary { - // Output only. The total number of checks. - int32 total_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of compliant checks. - int32 compliant_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of checks with violations. - int32 violation_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of checks with "manual review needed" status. - int32 manual_review_needed_count = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of checks that can't be performed due to errors. - int32 error_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [CreateFrameworkAudit][]. -message CreateFrameworkAuditRequest { - // Required. The parent resource where this framework audit is created. - // - // Supported formats are the following: - // - // * `organizations/{organization_id}/locations/{location}` - // * `folders/{folder_id}/locations/{location}` - // * `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" - } - ]; - - // Optional. The ID to use for the framework audit. The ID becomes the final - // component of the framework audit's full resource name. - // - // The ID must be between 4-63 characters, and valid characters - // are `\[a-z][0-9]-\`. - string framework_audit_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The framework audit to create. - FrameworkAudit framework_audit = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// A destination for the framework audit. -message FrameworkAuditDestination { - // The type of destination. - oneof destination_type { - // The Cloud Storage bucket destination. - BucketDestination bucket = 1; - } -} - -// A Cloud Storage bucket destination. -message BucketDestination { - // The set of options for the framework audit format. - enum Format { - // Default value. This value is unused. - FORMAT_UNSPECIFIED = 0; - - // The format for the framework audit report is Open Document. - ODF = 1; - } - - // Required. The URI of the Cloud Storage bucket. - string bucket_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The format of the framework audit. - Format framework_audit_format = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A framework audit. -message FrameworkAudit { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" - pattern: "projects/{project}/locations/{location}/frameworkAudits/{framework_audit}" - pattern: "organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}" - plural: "frameworkAudits" - singular: "frameworkAudit" - }; - - // The state of the framework audit. - enum State { - // Default value. This value is unused. - STATE_UNSPECIFIED = 0; - - // The audit is scheduled. - SCHEDULED = 1; - - // The audit is running. - RUNNING = 2; - - // The audit results are being uploaded. - UPLOADING = 3; - - // The audit failed. - FAILED = 4; - - // The audit completed successfully. - SUCCEEDED = 5; - } - - // Output only. Identifier. The name of the framework audit. - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. The ID of the framework audit. - string framework_audit_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The compliance framework used for the audit. - string compliance_framework = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The scope of the audit. - string scope = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The destination for the audit reports. - FrameworkAuditDestination framework_audit_destination = 5 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. The time that the audit started. - google.protobuf.Timestamp start_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time that the audit finished. - google.protobuf.Timestamp finish_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The overall compliance state of the audit. - ComplianceState compliance_state = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The summary of the report. - ReportSummary report_summary = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The details for the cloud control groups within this audit. - repeated CloudControlGroupAuditDetails cloud_control_group_audit_details = 10 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The details for the cloud controls within this audit. - repeated CloudControlAuditDetails cloud_control_audit_details = 11 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The ID of the long-running operation. - string operation_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The framework audit state of the audit. - State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [ListFrameworkAudits][]. -message ListFrameworkAuditsRequest { - // Required. The parent resource where the framework audits are listed. - // - // Supported formats are the following: - // - // * `organizations/{organization_id}/locations/{location}` - // * `folders/{folder_id}/locations/{location}` - // * `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" - } - ]; - - // Optional. The maximum number of framework audits to return. The service - // might return fewer audits than this value. If unspecified, a maximum of 10 - // framework audits are returned. The maximum value is 50; values above 50 are - // limited to 50. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The `next_page_token` value that's returned from a previous list - // request, if any. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filters to apply to the framework audits. - // Supported filters are `compliance_framework`, `compliance_state`, - // `create_time,` and `framework_audit_name`. If the filter is invalid, an - // invalid argument error is returned. - // For syntax details, see [AIP-160][https://google.aip.dev/160]. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [ListFrameworkAudits][]. -message ListFrameworkAuditsResponse { - // The framework audits. - repeated FrameworkAudit framework_audits = 1; - - // A token, which you can send as the `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// The request message for [GetFrameworkAudit][]. -message GetFrameworkAuditRequest { - // Required. The name of the framework audit to retrieve. - // - // Supported formats are the following: - // - // * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - // * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - // * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkAudit" - } - ]; -} - -// The details for a cloud control group. -message CloudControlGroupAuditDetails { - // Output only. The ID of the cloud control group. - string cloud_control_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The display name of the cloud control group. - string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The description of the cloud control group. - string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The responsibility type. - string responsibility_type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The description of Google's responsibility. - string google_responsibility_description = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The implementation of Google's responsibility. - string google_responsibility_implementation = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The description of your responsibility. - string customer_responsibility_description = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The implementation of your responsibility. - string customer_responsibility_implementation = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The compliance state of the control group. - ComplianceState compliance_state = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ID of the regulatory control. - string control_id = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The control family. - ControlFamily control_family = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The details for the cloud controls within this group. - repeated CloudControlAuditDetails cloud_control_details = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The summary of the report. - ReportSummary report_summary = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details for a finding. -message FindingDetails { - // Output only. The name of the finding. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The compliance state of the finding. - ComplianceState compliance_state = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The observation details for the finding. - ObservationDetails observation = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The evidence details for the finding. - EvidenceDetails evidence = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The observation details for a finding. -message ObservationDetails { - // Output only. The current value. - string current_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The expected value. - string expected_value = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Any guidance for the observation. - string guidance = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The evidence details for a finding. -message EvidenceDetails { - // Output only. The resource identifier. - string resource = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The service identifier. - string service = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The path to the evidence. - string evidence_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details for a cloud control audit. -message CloudControlAuditDetails { - // Output only. The name of the cloud control. - string cloud_control = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ID of the cloud control. - string cloud_control_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The description of the cloud control. - string cloud_control_description = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The overall status of the findings for the control. - ComplianceState compliance_state = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The summary of the report. - ReportSummary report_summary = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The findings for the control. - repeated FindingDetails findings = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto deleted file mode 100644 index bf41f21c650..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2025 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.cloudsecuritycompliance.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; -option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; -option java_multiple_files = true; -option java_outer_classname = "CmEnrollmentServiceProto"; -option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; -option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; -option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; - -// Service describing CmEnrollment related RPCs for -// complianceManager. -service CmEnrollmentService { - option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Updates the Compliance Manager enrollment for a resource to facilitate - // an audit. - // Use this method to enroll a resource in Compliance Manager or to - // create or update feature-specific configurations. - rpc UpdateCmEnrollment(UpdateCmEnrollmentRequest) returns (CmEnrollment) { - option (google.api.http) = { - patch: "/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}" - body: "cm_enrollment" - additional_bindings { - patch: "/v1/{cm_enrollment.name=folders/*/locations/*/cmEnrollment}" - body: "cm_enrollment" - } - additional_bindings { - patch: "/v1/{cm_enrollment.name=projects/*/locations/*/cmEnrollment}" - body: "cm_enrollment" - } - }; - option (google.api.method_signature) = "cm_enrollment,update_mask"; - } - - // Calculates the effective Compliance Manager enrollment for a resource. - // An effective enrollment is either a direct enrollment of a - // resource (if it exists), or an enrollment of the closest parent of a - // resource that's enrolled in Compliance Manager. - rpc CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest) - returns (CalculateEffectiveCmEnrollmentResponse) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/cmEnrollment}:calculate" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/cmEnrollment}:calculate" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// The request message for [UpdateCmEnrollment][]. -message UpdateCmEnrollmentRequest { - // Required. The Compliance Manager enrollment to update. - // The `name` field is used to identify the settings that you want to update. - CmEnrollment cm_enrollment = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The list of fields that you want to update. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [CalculateEffectiveCmEnrollment][]. -message CalculateEffectiveCmEnrollmentRequest { - // Required. The name of the Compliance Manager enrollment to calculate. - // - // Supported formats are the following: - // - // * `organizations/{organization_id}/locations/{location}/cmEnrollment` - // * `folders/{folder_id}/locations/{location}/cmEnrollment` - // * `projects/{project_id}/locations/{location}/cmEnrollment` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/CmEnrollment" - } - ]; -} - -// The settings for Compliance Manager at a specific resource scope.= -message CmEnrollment { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/CmEnrollment" - pattern: "organizations/{organization}/locations/{location}/cmEnrollment" - pattern: "projects/{project}/locations/{location}/cmEnrollment" - plural: "cmEnrollments" - singular: "cmEnrollment" - }; - - // Identifier. The name of the Compliance Manager enrollment. - // - // Supported formats are the following: - // - // * `organizations/{organization_id}/locations/{location}/cmEnrollment` - // * `folders/{folder_id}/locations/{location}/cmEnrollment` - // * `projects/{project_id}/locations/{location}/cmEnrollment` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. Whether the resource is enrolled in Compliance Manager. - // This setting is inherited by all descendants. - bool enrolled = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The audit configuration for Compliance Manager. - // If set at a scope, this configuration overrides any inherited audit - // configuration. - AuditConfig audit_config = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [CalculateEffectiveCmEnrollment][]. -message CalculateEffectiveCmEnrollmentResponse { - // The effective Compliance Manager enrollment for the resource. - CmEnrollment cm_enrollment = 1; -} - -// The audit configuration for Compliance Manager. -message AuditConfig { - // The destination details where audit reports are - // uploaded. - message CmEligibleDestination { - // Set of options for the report destination location. - oneof cm_eligible_destinations { - // The Cloud Storage bucket where audit reports and evidences can be - // uploaded. The format is `gs://{bucket_name}`. - string gcs_bucket = 1; - } - } - - // Required. The list of destinations that can be selected for uploading audit - // reports to. - repeated CmEligibleDestination destinations = 1 - [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto deleted file mode 100644 index 4f950a71499..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto +++ /dev/null @@ -1,810 +0,0 @@ -// Copyright 2026 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.cloudsecuritycompliance.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; -option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; -option java_multiple_files = true; -option java_outer_classname = "CommonProto"; -option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; -option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; -option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; -option (google.api.resource_definition) = { - type: "cloudsecuritycompliance.googleapis.com/OrganizationLocation" - pattern: "organizations/{organization}/locations/{location}" -}; - -// The responsibility type for the regulatory control. -enum RegulatoryControlResponsibilityType { - // Default value. This value is unused. - REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0; - - // Google's responsibility. - GOOGLE = 1; - - // Your responsibility. - CUSTOMER = 2; - - // Shared responsibility. - SHARED = 3; -} - -// The enforcement mode for the cloud control. -enum EnforcementMode { - // Default value. This value is unused. - ENFORCEMENT_MODE_UNSPECIFIED = 0; - - // The cloud control is enforced to prevent non-compliance. - PREVENTIVE = 1; - - // The cloud control is enforced to detect non-compliance. - DETECTIVE = 2; - - // The cloud control is enforced to audit for non-compliance. - AUDIT = 3; -} - -// The category for the framework. -enum FrameworkCategory { - // Default value. This value is unused. - FRAMEWORK_CATEGORY_UNSPECIFIED = 0; - - // An industry-defined framework. - INDUSTRY_DEFINED_STANDARD = 1; - - // An Assured Workloads framework. - ASSURED_WORKLOADS = 2; - - // A data security posture framework. - DATA_SECURITY = 3; - - // A Google's best practices framework. - GOOGLE_BEST_PRACTICES = 4; - - // A user-created framework. - CUSTOM_FRAMEWORK = 5; -} - -// The category for the cloud control. -enum CloudControlCategory { - // Default value. This value is unused. - CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0; - - // The infrastructure security category. - CC_CATEGORY_INFRASTRUCTURE = 1; - - // The artificial intelligence category. - CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2; - - // The physical security category. - CC_CATEGORY_PHYSICAL_SECURITY = 3; - - // The data security category. - CC_CATEGORY_DATA_SECURITY = 4; - - // The network security category. - CC_CATEGORY_NETWORK_SECURITY = 5; - - // The incident management category. - CC_CATEGORY_INCIDENT_MANAGEMENT = 6; - - // The identity and access management category. - CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7; - - // The encryption category. - CC_CATEGORY_ENCRYPTION = 8; - - // The logs management and infrastructure category. - CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9; - - // The HR, admin, and processes category. - CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10; - - // The third-party and sub-processor management category. - CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11; - - // The legal and disclosures category. - CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12; - - // The vulnerability management category. - CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13; - - // The privacy category. - CC_CATEGORY_PRIVACY = 14; - - // The business continuity and disaster recovery (BCDR) category. - CC_CATEGORY_BCDR = 15; - - // The admin access category. - CC_CATEGORY_ADMIN_ACCESS = 16; - - // DRZ (Data Residency). - CC_CATEGORY_DATA_RESIDENCY = 17; - - // RUR (Resource Usage Restriction). - CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18; - - // SERVICE SPECIFIC - CC_CATEGORY_SERVICE_SPECIFIC = 19; -} - -// The cloud provider that's associated with the cloud control. -enum CloudProvider { - // Default value. This value is unused. - CLOUD_PROVIDER_UNSPECIFIED = 0; - - // Amazon Web Services (AWS). - AWS = 1; - - // Microsoft Azure. - AZURE = 2; - - // Google Cloud. - GCP = 3; -} - -// The severity of the finding. -enum Severity { - // Default value. This value is unused. - SEVERITY_UNSPECIFIED = 0; - - // A critical vulnerability is easily discoverable by an external actor, - // exploitable, and results in the direct ability to execute arbitrary code, - // exfiltrate data, and otherwise gain additional access and privileges to - // cloud resources and workloads. Examples include publicly accessible - // unprotected user data and public SSH access with weak or no - // passwords. - // - // A critical threat is a threat that can access, modify, or delete data or - // execute unauthorized code within existing resources. - CRITICAL = 1; - - // A high-risk vulnerability can be easily discovered and exploited in - // combination with other vulnerabilities to gain direct access and - // the ability to execute arbitrary code, exfiltrate data, and otherwise - // gain additional access and privileges to cloud resources and workloads. - // An example is a database with weak or no passwords that is only - // accessible internally. This database could easily be compromised by an - // actor that had access to the internal network. - // - // A high-risk threat is a threat that can create new computational - // resources in an environment but can't access data or execute code in - // existing resources. - HIGH = 2; - - // A medium-risk vulnerability can be used by an actor to gain access to - // resources or privileges that enable them to eventually (through multiple - // steps or a complex exploit) gain access and the ability to execute - // arbitrary code or exfiltrate data. An example is a service account with - // access to more projects than it should have. If an actor gains access to - // the service account, they could potentially use that access to manipulate - // a project the service account was not intended to. - // - // A medium-risk threat can cause operational impact but might not - // access data or execute unauthorized code. - MEDIUM = 3; - - // A low-risk vulnerability hampers a security organization's ability to - // detect vulnerabilities or active threats in their deployment, or prevents - // the root cause investigation of security issues. An example is monitoring - // and logs being disabled for resource configurations and access. - // - // A low-risk threat is a threat that has obtained minimal access to an - // environment but can't access data, execute code, or create resources. - LOW = 4; -} - -// The action type of the rule. -enum RuleActionType { - // Default value. This value is unused. - RULE_ACTION_TYPE_UNSPECIFIED = 0; - - // The rule is intended to prevent non-compliance. - RULE_ACTION_TYPE_PREVENTIVE = 1; - - // The rule is intended to detect non-compliance. - RULE_ACTION_TYPE_DETECTIVE = 2; - - // The rule is intended to audit non-compliance. - RULE_ACTION_TYPE_AUDIT = 3; -} - -// The type of resource that a control or framework can be applied to. -enum TargetResourceType { - // Default value. This value is unused. - TARGET_RESOURCE_TYPE_UNSPECIFIED = 0; - - // The target resource is a Google Cloud organization. - TARGET_RESOURCE_CRM_TYPE_ORG = 1; - - // The target resource is a folder. - TARGET_RESOURCE_CRM_TYPE_FOLDER = 2; - - // The target resource is a project. - TARGET_RESOURCE_CRM_TYPE_PROJECT = 3; - - // The target resource is an application in App Hub. - TARGET_RESOURCE_TYPE_APPLICATION = 4; -} - -// A framework is a collection of cloud controls and regulatory controls -// that represent security best practices or industry-defined standards such as -// FedRAMP or NIST. -message Framework { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/Framework" - pattern: "organizations/{organization}/locations/{location}/frameworks/{framework}" - pattern: "projects/{project}/locations/{location}/frameworks/{framework}" - plural: "frameworks" - singular: "framework" - }; - - // The type of framework. - enum FrameworkType { - // Default value. This value is unused. - FRAMEWORK_TYPE_UNSPECIFIED = 0; - - // A framework that's provided and managed by Google. - BUILT_IN = 1; - - // A framework that's created and managed by you. - CUSTOM = 2; - } - - // Required. Identifier. The name of the framework, in one of the following - // formats: - // `organizations/{organization}/locations/{location}/frameworks/{framework}` - // or - // `projects/{project}/locations/{location}/frameworks/{framework}`. - // - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Output only. The major version of the framework, which is incremented in - // ascending order. - int64 major_revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The friendly name of the framework. The maximum length is 200 - // characters. - string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The description of the framework. The maximum length is 2000 - // characters. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The type of framework. - FrameworkType type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The cloud control details that are directly added without any - // grouping in the framework. - repeated CloudControlDetails cloud_control_details = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The category of the framework. - repeated FrameworkCategory category = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The cloud providers that are supported by the framework. - repeated CloudProvider supported_cloud_providers = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The target resource types that are supported by the framework. - repeated TargetResourceType supported_target_resource_types = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The supported enforcement modes of the framework. - repeated EnforcementMode supported_enforcement_modes = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a cloud control. -message CloudControlDetails { - // Required. The name of the cloud control, in one of the following formats: - // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - // or - // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - // - // The only supported location is `global`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The major version of the cloud control. - int64 major_revision_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Parameters are key-value pairs that let you provide your custom - // location requirements, environment requirements, or other settings that are - // relevant to the cloud control. An example parameter is - // `{"name": "location","value": "us-west-1"}`. - repeated Parameter parameters = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The reference of a framework, in one of the following formats: -// - `organizations/{organization}/locations/{location}/frameworks/{framework}` -// - `projects/{project}/locations/{location}/frameworks/{framework}`. -// -// The only supported location is `global`. -message FrameworkReference { - // Required. The major version of the framework. If not specified, the version - // corresponds to the latest version of the framework. - string framework = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/Framework" - } - ]; - - // Optional. The major version of the framework. If not specified, the version - // corresponds to the latest version of the framework. - optional int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Parameters are key-value pairs that let you provide your custom location -// requirements, environment requirements, or other settings that are -// relevant to the cloud control. -message Parameter { - // Required. The name or key of the parameter. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The value of the parameter. - ParamValue parameter_value = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A cloud control is a set of rules and associated metadata that you can -// use to define your organization's security or compliance intent. -message CloudControl { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/CloudControl" - pattern: "organizations/{organization}/locations/{location}/cloudControls/{cloud_control}" - pattern: "projects/{project}/locations/{location}/cloudControls/{cloud_control}" - plural: "cloudControls" - singular: "cloudControl" - }; - - // The type of cloud control. - enum Type { - // Default value. This value is unused. - TYPE_UNSPECIFIED = 0; - - // A cloud control that's created and managed by you. - CUSTOM = 1; - - // A cloud control that's provided and managed by Google. - BUILT_IN = 2; - } - - // Required. Identifier. The name of the cloud control, in either of the - // formats: - // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - // or - // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - // - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Output only. The major version of the cloud control, which is incremented - // in ascending order. - int64 major_revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. A description of the cloud control. The maximum length is 2000 - // characters. - string description = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The friendly name of the cloud control. The maximum length is 200 - // characters. - string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The supported enforcement modes for the cloud control. - repeated EnforcementMode supported_enforcement_modes = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The parameter specifications for the cloud control. - repeated ParameterSpec parameter_spec = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The rules that you can enforce to meet your security or - // compliance intent. - repeated Rule rules = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The severity of the findings that are generated by the cloud - // control. - Severity severity = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The finding category for the cloud control findings. The maximum - // length is 255 characters. - string finding_category = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The supported cloud providers. - repeated CloudProvider supported_cloud_providers = 13 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The frameworks that include this cloud control. - repeated string related_frameworks = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The remediation steps for the cloud control findings. The - // maximum length is 400 characters. - string remediation_steps = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The categories for the cloud control. - repeated CloudControlCategory categories = 16 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time that the cloud control was last updated. - // `create_time` is used because a new cloud control is created - // whenever an existing cloud control is updated. - google.protobuf.Timestamp create_time = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The target resource types that are supported by the cloud - // control. - repeated TargetResourceType supported_target_resource_types = 18 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The parameter specification for the cloud control. -message ParameterSpec { - // The type of parameter value. - enum ValueType { - // Default value. This value is unused. - VALUE_TYPE_UNSPECIFIED = 0; - - // A string value. - STRING = 3; - - // A boolean value. - BOOLEAN = 4; - - // A string list value. - STRINGLIST = 5; - - // A numeric value. - NUMBER = 6; - - // A oneOf value. - ONEOF = 7; - } - - // Required. The name of the parameter. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The friendly name of the parameter. The maximum length is 200 - // characters. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The description of the parameter. The maximum length is 2000 - // characters. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Whether the parameter is required. - bool is_required = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. The parameter value type. - ValueType value_type = 5 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The default value of the parameter. - ParamValue default_value = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of parameter substitutions. - repeated ParameterSubstitutionRule substitution_rules = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The parameter specification for `oneOf` attributes. - repeated ParameterSpec sub_parameters = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The permitted set of values for the parameter. - Validation validation = 9 [(google.api.field_behavior) = OPTIONAL]; -} - -// The validation of the parameter. -message Validation { - // Defines validators for parameter values. - oneof constraint { - // The permitted set of values for the parameter. - AllowedValues allowed_values = 1; - - // The permitted range for numeric parameters. - IntRange int_range = 2; - - // The regular expression for string parameters. - RegexpPattern regexp_pattern = 3; - } -} - -// The allowed set of values for the parameter. -message AllowedValues { - // Required. The list of allowed values for the parameter. - repeated ParamValue values = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The regular expression (regex) validator for parameter values. -message RegexpPattern { - // Required. The regex pattern to match the values of the parameter with. - string pattern = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The number range for number parameters. -message IntRange { - // Required. The minimum permitted value for the numeric parameter - // (inclusive). - int64 min = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The maximum permitted value for the numeric parameter - // (inclusive). - int64 max = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A list of strings for the parameter value. -message StringList { - // Required. The strings in the list. - repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The possible parameter value types. -message ParamValue { - // The list of possible parameter value types. - oneof kind { - // Optional. A string value. - string string_value = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A boolean value. - bool bool_value = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A repeated string. - StringList string_list_value = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A double value. - double number_value = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Sub-parameter values. - Parameter oneof_value = 7 [(google.api.field_behavior) = OPTIONAL]; - } -} - -// The parameter substitution rules. -message ParameterSubstitutionRule { - // The type of substitution. - oneof substitution_type { - // The placeholder substitution rule. - PlaceholderSubstitutionRule placeholder_substitution_rule = 1; - - // The attribute substitution rule. - AttributeSubstitutionRule attribute_substitution_rule = 2; - } -} - -// The attribute at the given path that's substituted entirely. -message AttributeSubstitutionRule { - // The fully qualified proto attribute path, in dot notation. - // For example: `rules[0].cel_expression.resource_types_values` - string attribute = 1; -} - -// The placeholder that's substituted in the rendered string. -message PlaceholderSubstitutionRule { - // The fully qualified proto attribute path, in dot notation. - string attribute = 1; -} - -// A rule in the cloud control. -message Rule { - // The rule implementation. - oneof implementation { - // The rule's logic expression in Common Expression Language (CEL). - CELExpression cel_expression = 1; - } - - // Optional. The rule description. The maximum length is 2000 characters. - string description = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The functionality that's enabled by the rule. - repeated RuleActionType rule_action_types = 16 - [(google.api.field_behavior) = REQUIRED]; -} - -// A Common Expression Language (CEL) expression that's used to create a rule. -message CELExpression { - // The criteria of the CEL expression. - oneof criteria { - // The resource instance types on which this expression is defined. - // The format is `/`. - // For example: `compute.googleapis.com/Instance` - StringList resource_types_values = 3; - } - - // Required. The logical expression in CEL. The maximum length of the - // condition is 1000 characters. For more information, see [CEL - // expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions). - string expression = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The metadata for 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. The server-defined resource path for the target of the - // operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the verb that was executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The 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 that the operation - // be cancelled. If an operation was cancelled successfully, then the field - // [google.longrunning.Operation.error][google.longrunning.Operation.error] - // contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED]. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The API version that was used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The regulatory control. -message Control { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/Control" - pattern: "organizations/{organization}/locations/{location}/controls/{control}" - pattern: "projects/{project}/locations/{location}/controls/{control}" - plural: "controls" - singular: "control" - }; - - // The regulatory control family. - enum Family { - // Default value. This value is unused. - FAMILY_UNSPECIFIED = 0; - - // Access control - AC = 1; - - // Awareness and araining - AT = 2; - - // Audit and accountability - AU = 3; - - // Certification, accreditation, and security assessments - CA = 4; - - // Configuration management - CM = 5; - - // Contingency planning - CP = 6; - - // Identification and authentication - IA = 7; - - // Incident response - IR = 8; - - // Maintenance - MA = 9; - - // Media protection - MP = 10; - - // Physical and environmental protection - PE = 11; - - // Security planning - PL = 12; - - // Personnel aecurity - PS = 13; - - // Risk assessment - RA = 14; - - // System services and acquisition - SA = 15; - - // System and communications protection - SC = 16; - - // System and information integrity - SI = 17; - - // Supply chain risk management - SR = 18; - } - - // Output only. The name of a regulatory control, in one of the following - // formats: - // - `organizations/{organization}/locations/{location}/controls/{control}` - // - `projects/{project}/locations/{location}/controls/{control}`. - // - // The only supported location is `global`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The friendly name for the regulatory control. - string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The description of the regulatory control. - string description = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The regulatory group that the control belongs to. - Family family = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The regulatory family that the control belongs to. - ControlFamily control_family = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The entity that's responsible for the control, whether Google, - // you as the customer, or both. - RegulatoryControlResponsibilityType responsibility_type = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A description of Google's responsibility for the regulatory - // control. - string google_responsibility_description = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A description of Google's responsibility for implementing the - // regulatory control. - string google_responsibility_implementation = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A description of your responsibility for the regulatory - // control. - string customer_responsibility_description = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A description of the your responsibility for implementing the - // regulatory control. - string customer_responsibility_implementation = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A description of the responsibility that's shared between - // Google and you in implementing this control. - string shared_responsibility_description = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A link to the documentation that's related to this control. - string additional_content_uri = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The frameworks that include this control. - repeated string related_frameworks = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The regulatory family of the control. -message ControlFamily { - // The identifier for the regulatory control family. - string family_id = 1; - - // The friendly name for the regulatory control family. - string display_name = 2; -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto deleted file mode 100644 index 85c153b90b9..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright 2026 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; -option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; -option java_multiple_files = true; -option java_outer_classname = "ConfigProto"; -option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; -option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; -option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; - -// Config Service manages compliance frameworks, cloud controls, and their -// configurations. -service Config { - option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists the frameworks (both built-in and custom) that are available within - // the parent resource. The latest major version of each framework is - // returned. - // This method supports pagination. - rpc ListFrameworks(ListFrameworksRequest) returns (ListFrameworksResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*}/frameworks" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*}/frameworks" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about a framework. - // This method retrieves the latest major version of the framework. - // - // To retrieve a specific major version, include `major_revision_id` in - // the request. - rpc GetFramework(GetFrameworkRequest) returns (Framework) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/frameworks/*}" - additional_bindings { - get: "/v1/{name=projects/*/locations/*/frameworks/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a custom framework in a given parent resource. - // You can't create built-in frameworks because those are managed by - // Google. - rpc CreateFramework(CreateFrameworkRequest) returns (Framework) { - option (google.api.http) = { - post: "/v1/{parent=organizations/*/locations/*}/frameworks" - body: "framework" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/frameworks" - body: "framework" - } - }; - option (google.api.method_signature) = "parent,framework,framework_id"; - } - - // Updates a custom framework. - // This method allows for partial updates of a framework. Use the - // `update_mask` to specify which fields to update. Consider the following: - // - // - If you provide an `update_mask`, only the fields that are specified - // in the mask are updated. - // - If you don't provide an `update_mask`, all the fields that are present - // in the request's `framework` body are used to overwrite the existing - // resource. - // - // You can only update frameworks with the `CUSTOM` type. - // A successful update creates a new version of the framework. - rpc UpdateFramework(UpdateFrameworkRequest) returns (Framework) { - option (google.api.http) = { - patch: "/v1/{framework.name=organizations/*/locations/*/frameworks/*}" - body: "framework" - additional_bindings { - patch: "/v1/{framework.name=projects/*/locations/*/frameworks/*}" - body: "framework" - } - }; - option (google.api.method_signature) = "framework,update_mask"; - } - - // Deletes a custom framework, including all its major and - // minor revisions. Consider the following: - // - // - You can't delete built-in frameworks. You can only delete frameworks - // with type `CUSTOM`. - // - You can't delete frameworks that are deployed to a resource. - // - You can't restore a deleted framework. This action is permanent. - rpc DeleteFramework(DeleteFrameworkRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=organizations/*/locations/*/frameworks/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/frameworks/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists the cloud controls (both built-in and custom) that are available - // in a given parent resource. The latest major version of each cloud control - // is returned. - // This method supports pagination. - rpc ListCloudControls(ListCloudControlsRequest) - returns (ListCloudControlsResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*}/cloudControls" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*}/cloudControls" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about a cloud control. - // This method retrieves the latest major version of a cloud control that - // you identify by name. - // - // By default, the latest major version of the cloud control is returned. - // To retrieve a specific major version, include `major_revision_id` in - // the request. - rpc GetCloudControl(GetCloudControlRequest) returns (CloudControl) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/cloudControls/*}" - additional_bindings { - get: "/v1/{name=projects/*/locations/*/cloudControls/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a custom cloud control in a given parent - // resource. - // You can't create built-in cloud controls because those are managed by - // Google. - rpc CreateCloudControl(CreateCloudControlRequest) returns (CloudControl) { - option (google.api.http) = { - post: "/v1/{parent=organizations/*/locations/*}/cloudControls" - body: "cloud_control" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/cloudControls" - body: "cloud_control" - } - }; - option (google.api.method_signature) = - "parent,cloud_control,cloud_control_id"; - } - - // Updates a custom cloud control. - // This method allows for partial updates of a cloud control. Use the - // `update_mask` to specify which fields to update. Consider the following: - // - // - If you provide an `update_mask`, only the fields that are specified - // in the mask are updated. - // - If you don't provide an `update_mask`, all the fields that are present - // in the request's `cloud_control` body are used to overwrite the existing - // resource. - // - // You can only update cloud controls with the `CUSTOM` type. - // A successful update creates a new version of the cloud control. - rpc UpdateCloudControl(UpdateCloudControlRequest) returns (CloudControl) { - option (google.api.http) = { - patch: "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}" - body: "cloud_control" - additional_bindings { - patch: "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}" - body: "cloud_control" - } - }; - option (google.api.method_signature) = "cloud_control,update_mask"; - } - - // Deletes a custom cloud control, including all its - // major and minor revisions. Consider the following: - // - // - You can't delete built-in cloud controls. You can only delete cloud - // controls with type `CUSTOM`. - // - You can't delete cloud controls if any of the versions are referenced - // by a framework. - // - You can't restore a deleted cloud control. This action is permanent. - rpc DeleteCloudControl(DeleteCloudControlRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=organizations/*/locations/*/cloudControls/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/cloudControls/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for [ListFrameworks][]. -message ListFrameworksRequest { - // Required. The parent resource name, in one of the following formats: - // - `organizations/{organization}/locations/{location}` - // - `projects/{project}/locations/{location}`. - // - // The only supported location is `global`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/Framework" - } - ]; - - // Optional. The maximum number of frameworks to return. The default value is - // `500`. - // - // If you exceed the maximum value of `1000`, then the service uses the - // maximum value. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request to list - // frameworks. Provide this token to retrieve the next page of results. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [ListFrameworks][]. -// Returns a paginated list of Framework resources. -message ListFrameworksResponse { - // The list of framework resources. - repeated Framework frameworks = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// The request message for [GetFramework][]. -message GetFrameworkRequest { - // Required. The name of the framework to retrieve, in one of the following - // formats: - // `organizations/{organization}/locations/{location}/frameworks/{framework}` - // or - // `projects/{project}/locations/{location}/frameworks/{framework}`. - // - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/Framework" - } - ]; - - // Optional. The framework major version to retrieve. If not specified, the - // most recently updated `revision_id` is retrieved. - int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [CreateFramework][]. -message CreateFrameworkRequest { - // Required. The parent resource name, in one of the following formats: - // - `organizations/{organization}/locations/{location}` - // - `projects/{project}/locations/{location}`. - // - // The only supported location is `global`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/Framework" - } - ]; - - // Required. The identifier (ID) of the framework. The ID is not the full name - // of the framework; it's the last part of the full name of the framework. - string framework_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource being created. - Framework framework = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [UpdateFramework][]. -message UpdateFrameworkRequest { - // Optional. A field mask is used to specify the fields to be overwritten in - // the framework resource by the update. The fields specified in the - // `update_mask` are relative to the resource, not the full request. A field - // is overwritten if it is in the mask. If you don't provide a mask then all - // fields present in the request will be overwritten. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The resource that is being updated. - Framework framework = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The major version ID of the framework to update. - int64 major_revision_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DeleteFramework][]. -message DeleteFrameworkRequest { - // Required. The name of the resource, in one of the following formats: - // `organizations/{organization}/locations/{location}/frameworks/{framework}` - // or - // `projects/{project}/locations/{location}/frameworks/{framework}`. - // - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/Framework" - } - ]; -} - -// Request message for [ListCloudControls][]. -message ListCloudControlsRequest { - // Required. The parent resource name, in one of the following formats: - // - `organizations/{organization}/locations/{location}` - // - `projects/{project}/locations/{location}`. - // - // The only supported location is `global`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/CloudControl" - } - ]; - - // Optional. The maximum number of cloud controls to return. The default value - // is `500`. - // - // If you exceed the maximum value of `1000`, then the service uses the - // maximum value. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token that's returned from a previous request to - // list cloud controls. Provide this token to retrieve the next page of - // results. - // - // When paginating, the parent that you provide to the - // [ListCloudControls][google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls] - // request must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [ListCloudControls][]. -message ListCloudControlsResponse { - // The list of CloudControl resources. - repeated CloudControl cloud_controls = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// The request message for [GetCloudControl][]. -message GetCloudControlRequest { - // Required. The name of the cloud control to retrieve, in one of the - // following formats: - // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - // or - // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - // - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/CloudControl" - } - ]; - - // Optional. The major version of the cloud control to retrieve. If not - // specified, the most recently updated `revision_id` is retrieved. - int64 major_revision_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [CreateCloudControl][]. -message CreateCloudControlRequest { - // Required. The parent resource name, in one of the following formats: - // - `organizations/{organization}/locations/{location}`. - // - `projects/{project}/locations/{location}`. - // - // The only supported location is `global`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/CloudControl" - } - ]; - - // Required. The identifier for the cloud control, which is the last segment - // of the cloud control name. The format is - // `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. - string cloud_control_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cloud control that's being created. - CloudControl cloud_control = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [UpdateCloudControl][]. -message UpdateCloudControlRequest { - // Optional. Use a field mask to specify the fields to be overwritten in the - // cloud control during the update. - // The fields that you specify in the `update_mask` are relative to the - // cloud control, not the full request. A field is overwritten if it is in - // the mask. If you don't provide a mask, all fields in the request - // are updated. - // - // You can update the following fields: - // - // - Display name - // - Description - // - Parameters - // - Rules - // - Parameter specification - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The cloud control that you're updating. - CloudControl cloud_control = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [DeleteCloudControl][]. -message DeleteCloudControlRequest { - // Required. The name of the cloud control to delete, in one of the following - // formats: - // `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` - // or - // `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. - // - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/CloudControl" - } - ]; -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto deleted file mode 100644 index be772f7cfb9..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright 2026 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; -option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; -option java_multiple_files = true; -option java_outer_classname = "DeploymentProto"; -option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; -option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; -option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; - -// Deployment service allows users to manage deployments of Frameworks and -// Cloud Controls on a target resource. -service Deployment { - option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a framework deployment in a given parent resource. A - // framework deployment lets you assign a particular framework version to an - // organization, folder, or project so that you can control and monitor - // those resources using the framework's cloud controls. - rpc CreateFrameworkDeployment(CreateFrameworkDeploymentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=organizations/*/locations/*}/frameworkDeployments" - body: "framework_deployment" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/frameworkDeployments" - body: "framework_deployment" - } - }; - option (google.api.method_signature) = - "parent,framework_deployment,framework_deployment_id"; - option (google.longrunning.operation_info) = { - response_type: "FrameworkDeployment" - metadata_type: "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - }; - } - - // Deletes a framework deployment. - rpc DeleteFrameworkDeployment(DeleteFrameworkDeploymentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" - } - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - }; - } - - // Gets details about a framework deployment. - rpc GetFrameworkDeployment(GetFrameworkDeploymentRequest) - returns (FrameworkDeployment) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" - additional_bindings { - get: "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists the framework deployments in a given parent resource. - rpc ListFrameworkDeployments(ListFrameworkDeploymentsRequest) - returns (ListFrameworkDeploymentsResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*}/frameworkDeployments" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*}/frameworkDeployments" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about a cloud control deployment. - rpc GetCloudControlDeployment(GetCloudControlDeploymentRequest) - returns (CloudControlDeployment) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}" - additional_bindings { - get: "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists the cloud conrol deployments in a given parent resource. - rpc ListCloudControlDeployments(ListCloudControlDeploymentsRequest) - returns (ListCloudControlDeploymentsResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*}/cloudControlDeployments" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// The state of the deployment resource. -enum DeploymentState { - // Default value. This value is unused. - DEPLOYMENT_STATE_UNSPECIFIED = 0; - - // Validating the deployment. - DEPLOYMENT_STATE_VALIDATING = 1; - - // Deployment is being created. - DEPLOYMENT_STATE_CREATING = 2; - - // Deployment is being deleted. - DEPLOYMENT_STATE_DELETING = 3; - - // Deployment is being updated. - DEPLOYMENT_STATE_UPDATING = 8; - - // Deployment has failed. All the changes made by the deployment were - // successfully rolled back. You can retry or delete a deployment that's - // in this state. - DEPLOYMENT_STATE_FAILED = 4; - - // Deployment is successful and ready to use. - DEPLOYMENT_STATE_READY = 5; - - // Deployment is partially deployed. All the cloud controls weren't deployed - // successfully. Retrying the operation resumes from the first failed - // step. - DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6; - - // Deployment is partially deleted. All the cloud control deployments weren't - // deleted successfully. Retrying the operation resumes from the first - // failed step. - DEPLOYMENT_STATE_PARTIALLY_DELETED = 7; -} - -// Framework deployments represent the assignment of a framework to a target -// resource. Supported target resources are organizations, folders, and -// projects. -message FrameworkDeployment { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - pattern: "organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}" - pattern: "projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}" - plural: "frameworkDeployments" - singular: "frameworkDeployment" - }; - - // Identifier. The name of the framework deployment, in the format - // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - // or - // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - // The only supported location is `global`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Required. The details of the target resource that you want to deploy the - // framework to. You can specify an existing resource, or create a new one. - TargetResourceConfig target_resource_config = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. The target resource to deploy the framework to, in one the - // following formats: - // - // - `organizations/{organizationID}` - // - `folders/{folderID}` - // - `projects/{projectID}` - string computed_target_resource = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. A reference to the framework that you're deploying. - FrameworkReference framework = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A user-provided description of the framework deployment. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The deployment mode and parameters for each of the cloud controls - // in the framework. Every cloud control in the framework includes metadata. - repeated CloudControlMetadata cloud_control_metadata = 6 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. The state for the framework deployment. - DeploymentState deployment_state = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which the resource was created. - google.protobuf.Timestamp create_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which the resource last updated. - google.protobuf.Timestamp update_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. To prevent concurrent updates from overwriting each other, always - // provide the `etag` when you update a framework deployment. You can also - // provide the `etag` when you delete a framework deployment, to help - // ensure that you're deleting the intended version of the - // framework deployment. - string etag = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The display name of the target resource. - string target_resource_display_name = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The references to the cloud control deployments. The reference - // includes all the cloud control deployments that are in the framework or in - // a cloud control group. - // - // For example, if a framework deployment deploys two - // cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the - // references are: - // - // ``` - // { - // cloud_control_deployment_reference: { - // cloud_control_deployment: - // "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-1" - // }, - // cloud_control_deployment_reference: { - // cloud_control_deployment: - // "organizations/{organization}/locations/{location}/cloudControlDeployments/cc-deployment-2" - // } - // ``` - repeated CloudControlDeploymentReference cloud_control_deployment_references = - 14 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A cloud control deployment represents the deployment of a particular cloud -// control on a target resource. Supported target resources are -// `organizations/{organizationID}`, `folders/{folderID}`, and -// `projects/{projectID}`. -message CloudControlDeployment { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" - pattern: "organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}" - pattern: "projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}" - plural: "cloudControlDeployments" - singular: "cloudControlDeployment" - }; - - // Identifier. The name for the cloud control deployment, in the format - // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - // or - // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - // The only supported location is `global`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Required. The details of the target resource that the cloud control is - // deployed You can use an existing target resource or create a new target. - TargetResourceConfig target_resource_config = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. The resource that the cloud control is deployed on, in one of - // the following formats: - // - // - `organizations/{organizationID}` - // - `folders/{folderID}` - // - `projects/{projectID}` - string target_resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The deployment mode and parameters for the cloud control. - CloudControlMetadata cloud_control_metadata = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. A friendly description for the cloud control deployment. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The state of the cloud control deployment. - DeploymentState deployment_state = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the resource was created. - google.protobuf.Timestamp create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the resource was last updated. - google.protobuf.Timestamp update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. To prevent concurrent updates from overwriting each other, - // provide the `etag` when you update a cloud control deployment. You can also - // provide the `etag` when you delete a cloud control deployment to help - // ensure that you're deleting the intended version of the - // deployment. - string etag = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The cloud control after the given parameters are substituted. - CloudControl parameter_substituted_cloud_control = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The references to the framework deployments that this cloud - // control deployment is part of. A cloud control deployment can be part of - // multiple framework deployments. - repeated FrameworkDeploymentReference framework_deployment_references = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The display name of the target resource. - string target_resource_display_name = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The name of the target resource or the configuration that's required to -// create a new target resource. -message TargetResourceConfig { - // The resource configuration for the target resource. - oneof resource_config { - // Optional. The resource hierarchy node, in one of the following formats: - // - // - `organizations/{organizationID}` - // - `folders/{folderID}` - // - `projects/{projectID}` - string existing_target_resource = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The details that are required to create a resource and use - // that resource as the target resource for deployment. - TargetResourceCreationConfig target_resource_creation_config = 2 - [(google.api.field_behavior) = OPTIONAL]; - } -} - -// The configuration that's required to create a target resource. -message TargetResourceCreationConfig { - // The configuration that's required to create the target resource. - oneof resource_creation_config { - // Optional. The configuration that's required to create a folder. - FolderCreationConfig folder_creation_config = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration that's required to create a project. - ProjectCreationConfig project_creation_config = 2 - [(google.api.field_behavior) = OPTIONAL]; - } -} - -// The configuration that's required to create a folder to be used -// as the target resource for a deployment. -message FolderCreationConfig { - // Required. The parent of the folder, in the format - // `organizations/{organizationID}` or `folders/{folderID}`. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The display name of the folder. - string folder_display_name = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The configuration that's required to create a project to be used -// as the target resource of a deployment. -message ProjectCreationConfig { - // Required. The parent of the project, in the format - // `organizations/{organizationID}` or `folders/{folderID}`. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The display name of the project. - string project_display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The billing account ID for the project. - string billing_account_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The enforcement mode and parameters of a cloud -// control deployment. -message CloudControlMetadata { - // Required. The cloud control name and parameters. - CloudControlDetails cloud_control_details = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The enforcement mode of the cloud control. - EnforcementMode enforcement_mode = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [CreateFrameworkDeployment][]. -message CreateFrameworkDeploymentRequest { - // Required. The parent resource of the framework deployment in the format - // `organizations/{organization}/locations/{location}` - // or - // `projects/{project}/locations/{location}`. - // Only the global location is supported. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - ]; - - // Optional. An identifier for the framework deployment that's unique in scope - // of the parent. If you don't specify a value, then a random UUID is - // generated. - string framework_deployment_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The framework deployment that you're creating. - FrameworkDeployment framework_deployment = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for [DeleteFrameworkDeployment][]. -message DeleteFrameworkDeploymentRequest { - // Required. The name of the framework deployment that you want to delete, - // in the format - // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - // or - // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - ]; - - // Optional. An opaque identifier for the current version of the resource. - // - // If you provide this value, then it must match the existing value. If the - // values don't match, then the request fails with an - // [`ABORTED`][google.rpc.Code.ABORTED] error. - // - // If you omit this value, then the resource is deleted regardless of its - // current `etag` value. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [GetFrameworkDeployment][]. -message GetFrameworkDeploymentRequest { - // Required. The name of the framework deployment, in the format - // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - // or - // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - ]; -} - -// The request message for [ListFrameworkDeployments][]. -message ListFrameworkDeploymentsRequest { - // Required. The parent resource of the framework deployment, in the format - // `organizations/{organization}/locations/{location}` - // or - // `projects/{project}/locations/{location}`. - // The only supported location is `global`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - ]; - - // Optional. The requested page size. The server might return fewer items than - // requested. - // If unspecified, the server picks an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token that identifies a page of results the server should - // return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to be applied on the resource, as defined by - // [AIP-160: Filtering](https://google.aip.dev/160). - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The sort order for the results. The following values are - // supported: - // - // * `name` - // * `name desc` - // - // If you do not specify a value, then the results are not sorted. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [ListFrameworkDeployments][]. -message ListFrameworkDeploymentsResponse { - // The list of framework deployments. - repeated FrameworkDeployment framework_deployments = 1; - - // A token that identifies the next page of results that the server - // should return. - string next_page_token = 2; -} - -// The request message for [GetCloudControlDeployment][]. -message GetCloudControlDeploymentRequest { - // Required. The name for the cloud control deployment, in the format - // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - // or - // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - // The only supported location is `global`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" - } - ]; -} - -// The request message for [ListCloudControlDeployments][]. -message ListCloudControlDeploymentsRequest { - // Required. The parent resource for the cloud control deployment, in the - // format `organizations/{organization}/locations/{location}` or - // `projects/{project}/locations/{location}`. - // The only supported location is `global`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" - } - ]; - - // Optional. The requested page size. The server might return fewer items than - // you requested. - // If unspecified, the server picks an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token that identifies the page of results that the server - // should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply on the resource, as defined by - // [AIP-160: Filtering](https://google.aip.dev/160). - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The sort order for the results. The following values are - // supported: - // - // * `name` - // * `name desc` - // - // If you do not specify a value, then the results are not sorted. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [ListCloudControlDeployments][]. -message ListCloudControlDeploymentsResponse { - // The list of cloud control deployments. - repeated CloudControlDeployment cloud_control_deployments = 1; - - // A token that identifies the next page of results that the server - // should return. - string next_page_token = 2; -} - -// The reference to a cloud control deployment. -message CloudControlDeploymentReference { - // Output only. The name of the CloudControlDeployment. The format is - // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - // or - // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - // The only supported location is `global`. - string cloud_control_deployment = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" - } - ]; -} - -// The reference to a framework deployment. -message FrameworkDeploymentReference { - // Output only. The name of the framework deployment, in the format - // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - // or - // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - // The only supported location is `global`. - string framework_deployment = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - ]; - - // Optional. The reference to the framework that this deployment is for. - // For example: - // - // ``` - // { - // framework: - // "organizations/{organization}/locations/{location}/frameworks/{framework}", - // major_revision_id: 1 - // } - // ``` - // - // The only supported location is `global`. - FrameworkReference framework_reference = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The display name of the framework that this framework deployment - // is for. - string framework_display_name = 3 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto deleted file mode 100644 index b2a5c3eae33..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto +++ /dev/null @@ -1,670 +0,0 @@ -// Copyright 2026 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.cloudsecuritycompliance.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/cloudsecuritycompliance/v1/common.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/type/interval.proto"; - -option csharp_namespace = "Google.Cloud.CloudSecurityCompliance.V1"; -option go_package = "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb"; -option java_multiple_files = true; -option java_outer_classname = "MonitoringProto"; -option java_package = "com.google.cloud.cloudsecuritycompliance.v1"; -option php_namespace = "Google\\Cloud\\CloudSecurityCompliance\\V1"; -option ruby_package = "Google::Cloud::CloudSecurityCompliance::V1"; -option (google.api.resource_definition) = { - type: "cloudsecuritycompliance.googleapis.com/FolderLocation" - pattern: "folders/{folder}/locations/{location}" -}; - -// Service describing handlers for resources -service Monitoring { - option (google.api.default_host) = "cloudsecuritycompliance.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists the framework compliance summary for a given scope. - rpc ListFrameworkComplianceSummaries(ListFrameworkComplianceSummariesRequest) - returns (ListFrameworkComplianceSummariesResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummaries" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/frameworkComplianceSummaries" - } - additional_bindings { - get: "/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Lists the finding summary by category for a given scope. - rpc ListFindingSummaries(ListFindingSummariesRequest) - returns (ListFindingSummariesResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*}/findingSummaries" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/findingSummaries" - } - additional_bindings { - get: "/v1/{parent=projects/*/locations/*}/findingSummaries" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Fetches the framework compliance report for a given scope. - rpc FetchFrameworkComplianceReport(FetchFrameworkComplianceReportRequest) - returns (FrameworkComplianceReport) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetch" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetch" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists the control compliance summary for a given scope. - rpc ListControlComplianceSummaries(ListControlComplianceSummariesRequest) - returns (ListControlComplianceSummariesResponse) { - option (google.api.http) = { - get: "/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" - } - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the aggregated compliance report over time for a given scope. - rpc AggregateFrameworkComplianceReport( - AggregateFrameworkComplianceReportRequest) - returns (AggregateFrameworkComplianceReportResponse) { - option (google.api.http) = { - get: "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregate" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregate" - } - additional_bindings { - get: "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// The evaluation state of the control. -enum EvaluationState { - // Default value. This value is unused. - EVALUATION_STATE_UNSPECIFIED = 0; - - // The control is passing. - EVALUATION_STATE_PASSED = 1; - - // The control is failing. - EVALUATION_STATE_FAILED = 2; - - // The control is not assessed. - EVALUATION_STATE_NOT_ASSESSED = 3; -} - -// A finding is a record of assessment data like security, risk, health, or -// privacy. -enum FindingClass { - // Default value. This value is unused. - FINDING_CLASS_UNSPECIFIED = 0; - - // The activity is unwanted or malicious. - THREAT = 1; - - // A potential weakness in software that increases risk to - // confidentiality, integrity, and availability. - VULNERABILITY = 2; - - // A potential weakness in a cloud resource or asset configuration that - // increases risk. - MISCONFIGURATION = 3; - - // A security observation that is for informational purposes. - OBSERVATION = 4; - - // An error that prevents Security Command Center from functioning properly. - SCC_ERROR = 5; - - // A potential security risk that's due to a change in the security - // posture. - POSTURE_VIOLATION = 6; - - // A combination of security issues that represent a more severe - // security problem when taken together. - TOXIC_COMBINATION = 7; - - // A potential security risk to data assets that contain sensitive - // data. - SENSITIVE_DATA_RISK = 8; - - // A resource or resource group where high risk attack paths - // converge, based on attack path simulations (APS). - CHOKEPOINT = 9; -} - -// Specifies the view of the framework compliance summary to be returned. -// New values may be added in the future. -enum FrameworkComplianceSummaryView { - // The default / unset value. The API will default to the BASIC view. - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0; - - // Includes basic compliance metadata, but omits trend data. - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1; - - // Includes all information, including - // [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count] - // and - // [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend]. - // Trend data is provided for the last 30 days. - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2; -} - -// The request message for -// [ListFrameworkComplianceSummariesRequest][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest]. -message ListFrameworkComplianceSummariesRequest { - // Required. The parent scope for the framework compliance summary. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" - } - ]; - - // Optional. The requested page size. The server might return fewer items than - // requested. If unspecified, the server picks an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token that identifies the page of results that the server - // should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filtering results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the level of detail to return in the response. - FrameworkComplianceSummaryView view = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for -// [ListFrameworkComplianceSummariesResponse][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse]. -message ListFrameworkComplianceSummariesResponse { - // The list of framework compliance summaries. - repeated FrameworkComplianceSummary framework_compliance_summaries = 1; - - // Output only. The token to retrieve the next page of results. - string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The response message for [GetFrameworkComplianceReport][]. -message FrameworkComplianceReport { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" - pattern: "projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" - pattern: "folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" - pattern: "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}" - plural: "frameworkComplianceReports" - singular: "frameworkComplianceReport" - }; - - // The name of the framework. - string framework = 1; - - // The description of the framework. - string framework_description = 2; - - // Output only. The last updated time of the report. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The control assessment details of the framework. - ControlAssessmentDetails control_assessment_details = 4; - - // The type of framework. - Framework.FrameworkType framework_type = 5; - - // The list of cloud providers supported by the framework. - repeated CloudProvider supported_cloud_providers = 6; - - // The list of framework categories supported. - repeated FrameworkCategory framework_categories = 7; - - // Optional. The display name for the framework. - string framework_display_name = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Identifier. The name of the framework compliance report. - string name = 9 [(google.api.field_behavior) = IDENTIFIER]; - - // The latest major revision ID of the framework. - int64 major_revision_id = 10; - - // The latest minor revision ID of the latest major revision of the framework. - int64 minor_revision_id = 11; - - // The target resource details of the framework. - repeated TargetResourceDetails target_resource_details = 12; -} - -// The request message for [FetchFrameworkComplianceReport][]. -message FetchFrameworkComplianceReportRequest { - // Required. The name of the framework compliance report to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" - } - ]; - - // Optional. The end time of the report. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filtering results. - string filter = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request message for [ListFindingSummaries][]. -message ListFindingSummariesRequest { - // Required. The parent scope for the framework overview page. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/FindingSummary" - } - ]; - - // Optional. The requested page size. The server might return fewer items than - // requested. If unspecified, the server picks an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token that identifies the page of results that the server - // should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filtering results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The end time of the finding summary. - google.protobuf.Timestamp end_time = 5 - [deprecated = true, (google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [ListFindingSummaries][]. -message ListFindingSummariesResponse { - // List of finding summary by category. - repeated FindingSummary finding_summaries = 1; - - // Output only. The token to retrieve the next page of results. - string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [ListControlComplianceSummaries][]. -message ListControlComplianceSummariesRequest { - // Required. The parent scope for the framework overview page. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" - } - ]; - - // Optional. The end time of the control compliance summary. - google.protobuf.Timestamp end_time = 2 - [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - - // Optional. The requested page size. The server might return fewer items than - // requested. If unspecified, the server picks an appropriate default. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token that identifies the page of results that the server - // should return. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filtering results. - string filter = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [ListControlComplianceSummaries][]. -message ListControlComplianceSummariesResponse { - // The list of control compliance details. - repeated ControlComplianceSummary control_compliance_summaries = 1; - - // Output only. The token to retrieve the next page of results. - string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request message for [AggregateFrameworkComplianceReport][]. -message AggregateFrameworkComplianceReportRequest { - // Required. The name of the aggregated compliance report over time to - // retrieve. - // - // The supported format is: - // `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" - } - ]; - - // Optional. The start and end time range for the aggregated compliance - // report. - google.type.Interval interval = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filtering results. - string filter = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for [AggregateFrameworkComplianceReport][]. -message AggregateFrameworkComplianceReportResponse { - // The list of aggregated compliance reports. - repeated AggregatedComplianceReport aggregated_compliance_reports = 1; -} - -// The details for a control assessment. -message ControlAssessmentDetails { - // The number of controls that are passing or not assessed. - int32 passing_controls = 1; - - // The number of controls that are failing. - int32 failing_controls = 2; - - // The number of controls that were assessed and are passing. - int32 assessed_passing_controls = 3; - - // The number of controls that aren't assessed because they require manual - // review. - int32 not_assessed_controls = 4; -} - -// The details for a framework compliance summary. -message FrameworkComplianceSummary { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" - pattern: "projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" - pattern: "folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" - pattern: "organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}" - plural: "frameworkComplianceSummaries" - singular: "frameworkComplianceSummary" - }; - - // The name of the framework. - string framework = 1; - - // The control assessment details of the framework. - ControlAssessmentDetails control_assessment_details = 2; - - // The type of framework. - Framework.FrameworkType framework_type = 3; - - // The list of cloud providers supported by the framework. - repeated CloudProvider supported_cloud_providers = 4; - - // The list of framework categories supported by the framework. - repeated FrameworkCategory framework_categories = 5; - - // Optional. The display name for the framework. - string framework_display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Identifier. The name of the framework compliance summary. - string name = 7 [(google.api.field_behavior) = IDENTIFIER]; - - // The major revision ID of the framework. - int64 major_revision_id = 8; - - // The minor revision ID of the framework. - int64 minor_revision_id = 9; - - // The target resource details for the framework. - repeated TargetResourceDetails target_resource_details = 10; - - // Output only. The count of the findings generated against the framework. - int64 finding_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The trend of controls that are passing for the given duration. - Trend controls_passing_trend = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details for a finding. -message FindingSummary { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/FindingSummary" - pattern: "projects/{project}/locations/{location}/findingSummaries/{finding_summary}" - pattern: "folders/{folder}/locations/{location}/findingSummaries/{finding_summary}" - pattern: "organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}" - plural: "findingSummaries" - singular: "findingSummary" - }; - - // The category of the finding. - string finding_category = 1; - - // The class of the finding. - FindingClass finding_class = 2; - - // The severity of the finding. - Severity severity = 3; - - // The count of the finding. - int64 finding_count = 4; - - // Output only. The last updated time of the finding. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The list of compliance frameworks that the finding belongs to. - repeated string related_frameworks = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Identifier. The name of the finding summary. - string name = 7 [(google.api.field_behavior) = IDENTIFIER]; -} - -// The details for control compliance. -message ControlComplianceSummary { - option (google.api.resource) = { - type: "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" - pattern: "projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" - pattern: "folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" - pattern: "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}" - plural: "controlComplianceSummaries" - singular: "controlComplianceSummary" - }; - - // The name of the control. - string control = 1; - - // The display name of the control. - string display_name = 2; - - // The description of the control. - string description = 3; - - // Output only. The overall evaluation status of the control. - EvaluationState overall_evaluation_state = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The total number of findings for the control. - int32 total_findings_count = 5; - - // The list of compliance frameworks that the control belongs to. - repeated string compliance_frameworks = 6; - - // The list of similar controls. - repeated SimilarControls similar_controls = 7; - - // The list of cloud control reports. - repeated CloudControlReport cloud_control_reports = 8; - - // The responsibility type for the control. - RegulatoryControlResponsibilityType control_responsibility_type = 9; - - // Whether the control is a fake control. Fake controls are created - // and mapped to cloud controls that don't belong to a control group. - bool is_fake_control = 10; - - // Identifier. The name of the control compliance summary. - string name = 11 [(google.api.field_behavior) = IDENTIFIER]; -} - -// The cloud control report. -message CloudControlReport { - // The assessment details of the cloud control. - oneof assessment_details { - // The details of a manual cloud control assessment. - ManualCloudControlAssessmentDetails - manual_cloud_control_assessment_details = 13; - - // The details of a cloud control assessment. - CloudControlAssessmentDetails cloud_control_assessment_details = 14; - } - - // The name of the cloud control. - string cloud_control = 1; - - // The display name of the cloud control. - string display_name = 2; - - // The description of the cloud control. - string description = 3; - - // The list of categories for the cloud control. - repeated string categories = 6; - - // The list of similar controls. - repeated SimilarControls similar_controls = 9; - - // The type of the cloud control. - CloudControl.Type cloud_control_type = 10; - - // The category of the finding. - string finding_category = 11; - - // The list of rules that correspond to the cloud control. - repeated Rule rules = 12; - - // The severity of the finding. - Severity finding_severity = 15; - - // The enforcement mode of the cloud control. - EnforcementMode enforcement_mode = 16; - - // The name of the cloud control deployment. - string cloud_control_deployment = 17; - - // The major revision ID of the cloud control. - int64 major_revision_id = 18; - - // The minor revision ID of the cloud control. - int64 minor_revision_id = 19; - - // The major revision IDs of the frameworks that the cloud control belongs to. - repeated int64 framework_major_revision_ids = 20; -} - -// The details for a manual cloud control assessment. -message ManualCloudControlAssessmentDetails { - // The guide for assessing a cloud control manually. - repeated string manual_cloud_control_guide = 1; -} - -// The cloud control assessment details for non-manual cloud controls. -message CloudControlAssessmentDetails { - // The number of findings for the cloud control. - int32 findings_count = 1; - - // Output only. The evaluation status of the cloud control. - EvaluationState evaluation_state = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The similar controls. -message SimilarControls { - // The name of the framework. - string framework = 1; - - // The ID of the control. - string control_id = 2; -} - -// The aggregated compliance report. -message AggregatedComplianceReport { - // The control assessment details of the framework. - ControlAssessmentDetails control_assessment_details = 1; - - // The report time of the aggregated compliance report. - google.protobuf.Timestamp report_time = 2; -} - -// The details for a target resource. -message TargetResourceDetails { - // The framework deployment name for the target resource. - // - // For example, - // `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}` - string framework_deployment = 1; - - // The display name of the target resource. For example, `google.com`, - // `staging-project`, or `development-folder`. - string target_resource_display_name = 2; - - // The target resource. For example, `organizations/1234567890`, - // `projects/1234567890`, or `folders/1234567890`. - string target_resource = 3; - - // The create time of the target resource. - google.protobuf.Timestamp create_time = 4; - - // The update time of the target resource. - google.protobuf.Timestamp update_time = 5; - - // The major revision ID of the framework for the target resource. - int64 major_revision_id = 6; - - // The minor revision ID of the framework for the target resource. - int64 minor_revision_id = 7; -} - -// The trend of a compliance metric. -message Trend { - // Output only. The duration for the trend. - google.protobuf.Duration duration = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The trend value as a percentage. The value can be positive or - // negative. - double value_percent = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts deleted file mode 100644 index 7d8d15d1f33..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.d.ts +++ /dev/null @@ -1,19302 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace cloudsecuritycompliance. */ - namespace cloudsecuritycompliance { - - /** Namespace v1. */ - namespace v1 { - - /** Represents an Audit */ - class Audit extends $protobuf.rpc.Service { - - /** - * Constructs a new Audit 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 Audit 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): Audit; - - /** - * Calls GenerateFrameworkAuditScopeReport. - * @param request GenerateFrameworkAuditScopeReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GenerateFrameworkAuditScopeReportResponse - */ - public generateFrameworkAuditScopeReport(request: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReportCallback): void; - - /** - * Calls GenerateFrameworkAuditScopeReport. - * @param request GenerateFrameworkAuditScopeReportRequest message or plain object - * @returns Promise - */ - public generateFrameworkAuditScopeReport(request: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest): Promise; - - /** - * Calls CreateFrameworkAudit. - * @param request CreateFrameworkAuditRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAuditCallback): void; - - /** - * Calls CreateFrameworkAudit. - * @param request CreateFrameworkAuditRequest message or plain object - * @returns Promise - */ - public createFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest): Promise; - - /** - * Calls ListFrameworkAudits. - * @param request ListFrameworkAuditsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFrameworkAuditsResponse - */ - public listFrameworkAudits(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAuditsCallback): void; - - /** - * Calls ListFrameworkAudits. - * @param request ListFrameworkAuditsRequest message or plain object - * @returns Promise - */ - public listFrameworkAudits(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest): Promise; - - /** - * Calls GetFrameworkAudit. - * @param request GetFrameworkAuditRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FrameworkAudit - */ - public getFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, callback: google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAuditCallback): void; - - /** - * Calls GetFrameworkAudit. - * @param request GetFrameworkAuditRequest message or plain object - * @returns Promise - */ - public getFrameworkAudit(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest): Promise; - } - - namespace Audit { - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|generateFrameworkAuditScopeReport}. - * @param error Error, if any - * @param [response] GenerateFrameworkAuditScopeReportResponse - */ - type GenerateFrameworkAuditScopeReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|createFrameworkAudit}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateFrameworkAuditCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|listFrameworkAudits}. - * @param error Error, if any - * @param [response] ListFrameworkAuditsResponse - */ - type ListFrameworkAuditsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|getFrameworkAudit}. - * @param error Error, if any - * @param [response] FrameworkAudit - */ - type GetFrameworkAuditCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) => void; - } - - /** ComplianceState enum. */ - enum ComplianceState { - COMPLIANCE_STATE_UNSPECIFIED = 0, - COMPLIANT = 1, - VIOLATION = 2, - MANUAL_REVIEW_NEEDED = 3, - ERROR = 4, - AUDIT_NOT_SUPPORTED = 5 - } - - /** Properties of a GenerateFrameworkAuditScopeReportRequest. */ - interface IGenerateFrameworkAuditScopeReportRequest { - - /** GenerateFrameworkAuditScopeReportRequest scope */ - scope?: (string|null); - - /** GenerateFrameworkAuditScopeReportRequest reportFormat */ - reportFormat?: (google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|null); - - /** GenerateFrameworkAuditScopeReportRequest complianceFramework */ - complianceFramework?: (string|null); - } - - /** Represents a GenerateFrameworkAuditScopeReportRequest. */ - class GenerateFrameworkAuditScopeReportRequest implements IGenerateFrameworkAuditScopeReportRequest { - - /** - * Constructs a new GenerateFrameworkAuditScopeReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest); - - /** GenerateFrameworkAuditScopeReportRequest scope. */ - public scope: string; - - /** GenerateFrameworkAuditScopeReportRequest reportFormat. */ - public reportFormat: (google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format); - - /** GenerateFrameworkAuditScopeReportRequest complianceFramework. */ - public complianceFramework: string; - - /** - * Creates a new GenerateFrameworkAuditScopeReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GenerateFrameworkAuditScopeReportRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. - * @param message GenerateFrameworkAuditScopeReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. - * @param message GenerateFrameworkAuditScopeReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenerateFrameworkAuditScopeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; - - /** - * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenerateFrameworkAuditScopeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; - - /** - * Verifies a GenerateFrameworkAuditScopeReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenerateFrameworkAuditScopeReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenerateFrameworkAuditScopeReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest; - - /** - * Creates a plain object from a GenerateFrameworkAuditScopeReportRequest message. Also converts values to other types if specified. - * @param message GenerateFrameworkAuditScopeReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenerateFrameworkAuditScopeReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GenerateFrameworkAuditScopeReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GenerateFrameworkAuditScopeReportRequest { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - ODF = 1 - } - } - - /** Properties of a GenerateFrameworkAuditScopeReportResponse. */ - interface IGenerateFrameworkAuditScopeReportResponse { - - /** GenerateFrameworkAuditScopeReportResponse scopeReportContents */ - scopeReportContents?: (Uint8Array|Buffer|string|null); - - /** GenerateFrameworkAuditScopeReportResponse name */ - name?: (string|null); - - /** GenerateFrameworkAuditScopeReportResponse complianceFramework */ - complianceFramework?: (string|null); - } - - /** Represents a GenerateFrameworkAuditScopeReportResponse. */ - class GenerateFrameworkAuditScopeReportResponse implements IGenerateFrameworkAuditScopeReportResponse { - - /** - * Constructs a new GenerateFrameworkAuditScopeReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse); - - /** GenerateFrameworkAuditScopeReportResponse scopeReportContents. */ - public scopeReportContents?: (Uint8Array|Buffer|string|null); - - /** GenerateFrameworkAuditScopeReportResponse name. */ - public name: string; - - /** GenerateFrameworkAuditScopeReportResponse complianceFramework. */ - public complianceFramework: string; - - /** GenerateFrameworkAuditScopeReportResponse auditReport. */ - public auditReport?: "scopeReportContents"; - - /** - * Creates a new GenerateFrameworkAuditScopeReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GenerateFrameworkAuditScopeReportResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. - * @param message GenerateFrameworkAuditScopeReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. - * @param message GenerateFrameworkAuditScopeReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenerateFrameworkAuditScopeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; - - /** - * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenerateFrameworkAuditScopeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; - - /** - * Verifies a GenerateFrameworkAuditScopeReportResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenerateFrameworkAuditScopeReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenerateFrameworkAuditScopeReportResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse; - - /** - * Creates a plain object from a GenerateFrameworkAuditScopeReportResponse message. Also converts values to other types if specified. - * @param message GenerateFrameworkAuditScopeReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenerateFrameworkAuditScopeReportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GenerateFrameworkAuditScopeReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReportSummary. */ - interface IReportSummary { - - /** ReportSummary totalCount */ - totalCount?: (number|null); - - /** ReportSummary compliantCount */ - compliantCount?: (number|null); - - /** ReportSummary violationCount */ - violationCount?: (number|null); - - /** ReportSummary manualReviewNeededCount */ - manualReviewNeededCount?: (number|null); - - /** ReportSummary errorCount */ - errorCount?: (number|null); - } - - /** Represents a ReportSummary. */ - class ReportSummary implements IReportSummary { - - /** - * Constructs a new ReportSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IReportSummary); - - /** ReportSummary totalCount. */ - public totalCount: number; - - /** ReportSummary compliantCount. */ - public compliantCount: number; - - /** ReportSummary violationCount. */ - public violationCount: number; - - /** ReportSummary manualReviewNeededCount. */ - public manualReviewNeededCount: number; - - /** ReportSummary errorCount. */ - public errorCount: number; - - /** - * Creates a new ReportSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns ReportSummary instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IReportSummary): google.cloud.cloudsecuritycompliance.v1.ReportSummary; - - /** - * Encodes the specified ReportSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. - * @param message ReportSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IReportSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReportSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. - * @param message ReportSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IReportSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReportSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReportSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ReportSummary; - - /** - * Decodes a ReportSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReportSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ReportSummary; - - /** - * Verifies a ReportSummary message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReportSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReportSummary - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ReportSummary; - - /** - * Creates a plain object from a ReportSummary message. Also converts values to other types if specified. - * @param message ReportSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ReportSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReportSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReportSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateFrameworkAuditRequest. */ - interface ICreateFrameworkAuditRequest { - - /** CreateFrameworkAuditRequest parent */ - parent?: (string|null); - - /** CreateFrameworkAuditRequest frameworkAuditId */ - frameworkAuditId?: (string|null); - - /** CreateFrameworkAuditRequest frameworkAudit */ - frameworkAudit?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null); - } - - /** Represents a CreateFrameworkAuditRequest. */ - class CreateFrameworkAuditRequest implements ICreateFrameworkAuditRequest { - - /** - * Constructs a new CreateFrameworkAuditRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest); - - /** CreateFrameworkAuditRequest parent. */ - public parent: string; - - /** CreateFrameworkAuditRequest frameworkAuditId. */ - public frameworkAuditId: string; - - /** CreateFrameworkAuditRequest frameworkAudit. */ - public frameworkAudit?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null); - - /** - * Creates a new CreateFrameworkAuditRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateFrameworkAuditRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; - - /** - * Encodes the specified CreateFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. - * @param message CreateFrameworkAuditRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. - * @param message CreateFrameworkAuditRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; - - /** - * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; - - /** - * Verifies a CreateFrameworkAuditRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateFrameworkAuditRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest; - - /** - * Creates a plain object from a CreateFrameworkAuditRequest message. Also converts values to other types if specified. - * @param message CreateFrameworkAuditRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateFrameworkAuditRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateFrameworkAuditRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FrameworkAuditDestination. */ - interface IFrameworkAuditDestination { - - /** FrameworkAuditDestination bucket */ - bucket?: (google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null); - } - - /** Represents a FrameworkAuditDestination. */ - class FrameworkAuditDestination implements IFrameworkAuditDestination { - - /** - * Constructs a new FrameworkAuditDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination); - - /** FrameworkAuditDestination bucket. */ - public bucket?: (google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null); - - /** FrameworkAuditDestination destinationType. */ - public destinationType?: "bucket"; - - /** - * Creates a new FrameworkAuditDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns FrameworkAuditDestination instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; - - /** - * Encodes the specified FrameworkAuditDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. - * @param message FrameworkAuditDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FrameworkAuditDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. - * @param message FrameworkAuditDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FrameworkAuditDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FrameworkAuditDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; - - /** - * Decodes a FrameworkAuditDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FrameworkAuditDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; - - /** - * Verifies a FrameworkAuditDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FrameworkAuditDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FrameworkAuditDestination - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination; - - /** - * Creates a plain object from a FrameworkAuditDestination message. Also converts values to other types if specified. - * @param message FrameworkAuditDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FrameworkAuditDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FrameworkAuditDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BucketDestination. */ - interface IBucketDestination { - - /** BucketDestination bucketUri */ - bucketUri?: (string|null); - - /** BucketDestination frameworkAuditFormat */ - frameworkAuditFormat?: (google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|null); - } - - /** Represents a BucketDestination. */ - class BucketDestination implements IBucketDestination { - - /** - * Constructs a new BucketDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IBucketDestination); - - /** BucketDestination bucketUri. */ - public bucketUri: string; - - /** BucketDestination frameworkAuditFormat. */ - public frameworkAuditFormat: (google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|keyof typeof google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format); - - /** - * Creates a new BucketDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns BucketDestination instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IBucketDestination): google.cloud.cloudsecuritycompliance.v1.BucketDestination; - - /** - * Encodes the specified BucketDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. - * @param message BucketDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IBucketDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BucketDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. - * @param message BucketDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IBucketDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BucketDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BucketDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.BucketDestination; - - /** - * Decodes a BucketDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BucketDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.BucketDestination; - - /** - * Verifies a BucketDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BucketDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BucketDestination - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.BucketDestination; - - /** - * Creates a plain object from a BucketDestination message. Also converts values to other types if specified. - * @param message BucketDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.BucketDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BucketDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BucketDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BucketDestination { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - ODF = 1 - } - } - - /** Properties of a FrameworkAudit. */ - interface IFrameworkAudit { - - /** FrameworkAudit name */ - name?: (string|null); - - /** FrameworkAudit frameworkAuditId */ - frameworkAuditId?: (string|null); - - /** FrameworkAudit complianceFramework */ - complianceFramework?: (string|null); - - /** FrameworkAudit scope */ - scope?: (string|null); - - /** FrameworkAudit frameworkAuditDestination */ - frameworkAuditDestination?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null); - - /** FrameworkAudit startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkAudit finishTime */ - finishTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkAudit complianceState */ - complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); - - /** FrameworkAudit reportSummary */ - reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - - /** FrameworkAudit cloudControlGroupAuditDetails */ - cloudControlGroupAuditDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails[]|null); - - /** FrameworkAudit cloudControlAuditDetails */ - cloudControlAuditDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]|null); - - /** FrameworkAudit operationId */ - operationId?: (string|null); - - /** FrameworkAudit state */ - state?: (google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|null); - } - - /** Represents a FrameworkAudit. */ - class FrameworkAudit implements IFrameworkAudit { - - /** - * Constructs a new FrameworkAudit. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit); - - /** FrameworkAudit name. */ - public name: string; - - /** FrameworkAudit frameworkAuditId. */ - public frameworkAuditId: string; - - /** FrameworkAudit complianceFramework. */ - public complianceFramework: string; - - /** FrameworkAudit scope. */ - public scope: string; - - /** FrameworkAudit frameworkAuditDestination. */ - public frameworkAuditDestination?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null); - - /** FrameworkAudit startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkAudit finishTime. */ - public finishTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkAudit complianceState. */ - public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); - - /** FrameworkAudit reportSummary. */ - public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - - /** FrameworkAudit cloudControlGroupAuditDetails. */ - public cloudControlGroupAuditDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails[]; - - /** FrameworkAudit cloudControlAuditDetails. */ - public cloudControlAuditDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]; - - /** FrameworkAudit operationId. */ - public operationId: string; - - /** FrameworkAudit state. */ - public state: (google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State); - - /** - * Creates a new FrameworkAudit instance using the specified properties. - * @param [properties] Properties to set - * @returns FrameworkAudit instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; - - /** - * Encodes the specified FrameworkAudit message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. - * @param message FrameworkAudit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FrameworkAudit message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. - * @param message FrameworkAudit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FrameworkAudit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FrameworkAudit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; - - /** - * Decodes a FrameworkAudit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FrameworkAudit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; - - /** - * Verifies a FrameworkAudit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FrameworkAudit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FrameworkAudit - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkAudit; - - /** - * Creates a plain object from a FrameworkAudit message. Also converts values to other types if specified. - * @param message FrameworkAudit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkAudit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FrameworkAudit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FrameworkAudit - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FrameworkAudit { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SCHEDULED = 1, - RUNNING = 2, - UPLOADING = 3, - FAILED = 4, - SUCCEEDED = 5 - } - } - - /** Properties of a ListFrameworkAuditsRequest. */ - interface IListFrameworkAuditsRequest { - - /** ListFrameworkAuditsRequest parent */ - parent?: (string|null); - - /** ListFrameworkAuditsRequest pageSize */ - pageSize?: (number|null); - - /** ListFrameworkAuditsRequest pageToken */ - pageToken?: (string|null); - - /** ListFrameworkAuditsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListFrameworkAuditsRequest. */ - class ListFrameworkAuditsRequest implements IListFrameworkAuditsRequest { - - /** - * Constructs a new ListFrameworkAuditsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest); - - /** ListFrameworkAuditsRequest parent. */ - public parent: string; - - /** ListFrameworkAuditsRequest pageSize. */ - public pageSize: number; - - /** ListFrameworkAuditsRequest pageToken. */ - public pageToken: string; - - /** ListFrameworkAuditsRequest filter. */ - public filter: string; - - /** - * Creates a new ListFrameworkAuditsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworkAuditsRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; - - /** - * Encodes the specified ListFrameworkAuditsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. - * @param message ListFrameworkAuditsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworkAuditsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. - * @param message ListFrameworkAuditsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworkAuditsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; - - /** - * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworkAuditsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; - - /** - * Verifies a ListFrameworkAuditsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworkAuditsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworkAuditsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest; - - /** - * Creates a plain object from a ListFrameworkAuditsRequest message. Also converts values to other types if specified. - * @param message ListFrameworkAuditsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworkAuditsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworkAuditsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFrameworkAuditsResponse. */ - interface IListFrameworkAuditsResponse { - - /** ListFrameworkAuditsResponse frameworkAudits */ - frameworkAudits?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]|null); - - /** ListFrameworkAuditsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFrameworkAuditsResponse. */ - class ListFrameworkAuditsResponse implements IListFrameworkAuditsResponse { - - /** - * Constructs a new ListFrameworkAuditsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse); - - /** ListFrameworkAuditsResponse frameworkAudits. */ - public frameworkAudits: google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]; - - /** ListFrameworkAuditsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListFrameworkAuditsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworkAuditsResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; - - /** - * Encodes the specified ListFrameworkAuditsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. - * @param message ListFrameworkAuditsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworkAuditsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. - * @param message ListFrameworkAuditsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworkAuditsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; - - /** - * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworkAuditsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; - - /** - * Verifies a ListFrameworkAuditsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworkAuditsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworkAuditsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse; - - /** - * Creates a plain object from a ListFrameworkAuditsResponse message. Also converts values to other types if specified. - * @param message ListFrameworkAuditsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworkAuditsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworkAuditsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetFrameworkAuditRequest. */ - interface IGetFrameworkAuditRequest { - - /** GetFrameworkAuditRequest name */ - name?: (string|null); - } - - /** Represents a GetFrameworkAuditRequest. */ - class GetFrameworkAuditRequest implements IGetFrameworkAuditRequest { - - /** - * Constructs a new GetFrameworkAuditRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest); - - /** GetFrameworkAuditRequest name. */ - public name: string; - - /** - * Creates a new GetFrameworkAuditRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFrameworkAuditRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; - - /** - * Encodes the specified GetFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. - * @param message GetFrameworkAuditRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. - * @param message GetFrameworkAuditRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; - - /** - * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; - - /** - * Verifies a GetFrameworkAuditRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFrameworkAuditRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest; - - /** - * Creates a plain object from a GetFrameworkAuditRequest message. Also converts values to other types if specified. - * @param message GetFrameworkAuditRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetFrameworkAuditRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetFrameworkAuditRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControlGroupAuditDetails. */ - interface ICloudControlGroupAuditDetails { - - /** CloudControlGroupAuditDetails cloudControlGroupId */ - cloudControlGroupId?: (string|null); - - /** CloudControlGroupAuditDetails displayName */ - displayName?: (string|null); - - /** CloudControlGroupAuditDetails description */ - description?: (string|null); - - /** CloudControlGroupAuditDetails responsibilityType */ - responsibilityType?: (string|null); - - /** CloudControlGroupAuditDetails googleResponsibilityDescription */ - googleResponsibilityDescription?: (string|null); - - /** CloudControlGroupAuditDetails googleResponsibilityImplementation */ - googleResponsibilityImplementation?: (string|null); - - /** CloudControlGroupAuditDetails customerResponsibilityDescription */ - customerResponsibilityDescription?: (string|null); - - /** CloudControlGroupAuditDetails customerResponsibilityImplementation */ - customerResponsibilityImplementation?: (string|null); - - /** CloudControlGroupAuditDetails complianceState */ - complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); - - /** CloudControlGroupAuditDetails controlId */ - controlId?: (string|null); - - /** CloudControlGroupAuditDetails controlFamily */ - controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); - - /** CloudControlGroupAuditDetails cloudControlDetails */ - cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]|null); - - /** CloudControlGroupAuditDetails reportSummary */ - reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - } - - /** Represents a CloudControlGroupAuditDetails. */ - class CloudControlGroupAuditDetails implements ICloudControlGroupAuditDetails { - - /** - * Constructs a new CloudControlGroupAuditDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails); - - /** CloudControlGroupAuditDetails cloudControlGroupId. */ - public cloudControlGroupId: string; - - /** CloudControlGroupAuditDetails displayName. */ - public displayName: string; - - /** CloudControlGroupAuditDetails description. */ - public description: string; - - /** CloudControlGroupAuditDetails responsibilityType. */ - public responsibilityType: string; - - /** CloudControlGroupAuditDetails googleResponsibilityDescription. */ - public googleResponsibilityDescription: string; - - /** CloudControlGroupAuditDetails googleResponsibilityImplementation. */ - public googleResponsibilityImplementation: string; - - /** CloudControlGroupAuditDetails customerResponsibilityDescription. */ - public customerResponsibilityDescription: string; - - /** CloudControlGroupAuditDetails customerResponsibilityImplementation. */ - public customerResponsibilityImplementation: string; - - /** CloudControlGroupAuditDetails complianceState. */ - public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); - - /** CloudControlGroupAuditDetails controlId. */ - public controlId: string; - - /** CloudControlGroupAuditDetails controlFamily. */ - public controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); - - /** CloudControlGroupAuditDetails cloudControlDetails. */ - public cloudControlDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails[]; - - /** CloudControlGroupAuditDetails reportSummary. */ - public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - - /** - * Creates a new CloudControlGroupAuditDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlGroupAuditDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; - - /** - * Encodes the specified CloudControlGroupAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. - * @param message CloudControlGroupAuditDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlGroupAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. - * @param message CloudControlGroupAuditDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlGroupAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; - - /** - * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlGroupAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; - - /** - * Verifies a CloudControlGroupAuditDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlGroupAuditDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlGroupAuditDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails; - - /** - * Creates a plain object from a CloudControlGroupAuditDetails message. Also converts values to other types if specified. - * @param message CloudControlGroupAuditDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlGroupAuditDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlGroupAuditDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FindingDetails. */ - interface IFindingDetails { - - /** FindingDetails name */ - name?: (string|null); - - /** FindingDetails complianceState */ - complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); - - /** FindingDetails observation */ - observation?: (google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null); - - /** FindingDetails evidence */ - evidence?: (google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null); - } - - /** Represents a FindingDetails. */ - class FindingDetails implements IFindingDetails { - - /** - * Constructs a new FindingDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingDetails); - - /** FindingDetails name. */ - public name: string; - - /** FindingDetails complianceState. */ - public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); - - /** FindingDetails observation. */ - public observation?: (google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null); - - /** FindingDetails evidence. */ - public evidence?: (google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null); - - /** - * Creates a new FindingDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns FindingDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingDetails): google.cloud.cloudsecuritycompliance.v1.FindingDetails; - - /** - * Encodes the specified FindingDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. - * @param message FindingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FindingDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. - * @param message FindingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FindingDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FindingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FindingDetails; - - /** - * Decodes a FindingDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FindingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FindingDetails; - - /** - * Verifies a FindingDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FindingDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FindingDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FindingDetails; - - /** - * Creates a plain object from a FindingDetails message. Also converts values to other types if specified. - * @param message FindingDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FindingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FindingDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FindingDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ObservationDetails. */ - interface IObservationDetails { - - /** ObservationDetails currentValue */ - currentValue?: (string|null); - - /** ObservationDetails expectedValue */ - expectedValue?: (string|null); - - /** ObservationDetails guidance */ - guidance?: (string|null); - } - - /** Represents an ObservationDetails. */ - class ObservationDetails implements IObservationDetails { - - /** - * Constructs a new ObservationDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IObservationDetails); - - /** ObservationDetails currentValue. */ - public currentValue: string; - - /** ObservationDetails expectedValue. */ - public expectedValue: string; - - /** ObservationDetails guidance. */ - public guidance: string; - - /** - * Creates a new ObservationDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ObservationDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IObservationDetails): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; - - /** - * Encodes the specified ObservationDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. - * @param message ObservationDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IObservationDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ObservationDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. - * @param message ObservationDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IObservationDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ObservationDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ObservationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; - - /** - * Decodes an ObservationDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ObservationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; - - /** - * Verifies an ObservationDetails message. - * @param message Plain 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 ObservationDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ObservationDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ObservationDetails; - - /** - * Creates a plain object from an ObservationDetails message. Also converts values to other types if specified. - * @param message ObservationDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ObservationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ObservationDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ObservationDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EvidenceDetails. */ - interface IEvidenceDetails { - - /** EvidenceDetails resource */ - resource?: (string|null); - - /** EvidenceDetails service */ - service?: (string|null); - - /** EvidenceDetails evidencePath */ - evidencePath?: (string|null); - } - - /** Represents an EvidenceDetails. */ - class EvidenceDetails implements IEvidenceDetails { - - /** - * Constructs a new EvidenceDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails); - - /** EvidenceDetails resource. */ - public resource: string; - - /** EvidenceDetails service. */ - public service: string; - - /** EvidenceDetails evidencePath. */ - public evidencePath: string; - - /** - * Creates a new EvidenceDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns EvidenceDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; - - /** - * Encodes the specified EvidenceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. - * @param message EvidenceDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EvidenceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. - * @param message EvidenceDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EvidenceDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EvidenceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; - - /** - * Decodes an EvidenceDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EvidenceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; - - /** - * Verifies an EvidenceDetails message. - * @param message Plain 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 EvidenceDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EvidenceDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.EvidenceDetails; - - /** - * Creates a plain object from an EvidenceDetails message. Also converts values to other types if specified. - * @param message EvidenceDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.EvidenceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EvidenceDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EvidenceDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControlAuditDetails. */ - interface ICloudControlAuditDetails { - - /** CloudControlAuditDetails cloudControl */ - cloudControl?: (string|null); - - /** CloudControlAuditDetails cloudControlId */ - cloudControlId?: (string|null); - - /** CloudControlAuditDetails cloudControlDescription */ - cloudControlDescription?: (string|null); - - /** CloudControlAuditDetails complianceState */ - complianceState?: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState|null); - - /** CloudControlAuditDetails reportSummary */ - reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - - /** CloudControlAuditDetails findings */ - findings?: (google.cloud.cloudsecuritycompliance.v1.IFindingDetails[]|null); - } - - /** Represents a CloudControlAuditDetails. */ - class CloudControlAuditDetails implements ICloudControlAuditDetails { - - /** - * Constructs a new CloudControlAuditDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails); - - /** CloudControlAuditDetails cloudControl. */ - public cloudControl: string; - - /** CloudControlAuditDetails cloudControlId. */ - public cloudControlId: string; - - /** CloudControlAuditDetails cloudControlDescription. */ - public cloudControlDescription: string; - - /** CloudControlAuditDetails complianceState. */ - public complianceState: (google.cloud.cloudsecuritycompliance.v1.ComplianceState|keyof typeof google.cloud.cloudsecuritycompliance.v1.ComplianceState); - - /** CloudControlAuditDetails reportSummary. */ - public reportSummary?: (google.cloud.cloudsecuritycompliance.v1.IReportSummary|null); - - /** CloudControlAuditDetails findings. */ - public findings: google.cloud.cloudsecuritycompliance.v1.IFindingDetails[]; - - /** - * Creates a new CloudControlAuditDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlAuditDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; - - /** - * Encodes the specified CloudControlAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. - * @param message CloudControlAuditDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. - * @param message CloudControlAuditDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlAuditDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; - - /** - * Decodes a CloudControlAuditDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; - - /** - * Verifies a CloudControlAuditDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlAuditDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlAuditDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails; - - /** - * Creates a plain object from a CloudControlAuditDetails message. Also converts values to other types if specified. - * @param message CloudControlAuditDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlAuditDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlAuditDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** RegulatoryControlResponsibilityType enum. */ - enum RegulatoryControlResponsibilityType { - REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0, - GOOGLE = 1, - CUSTOMER = 2, - SHARED = 3 - } - - /** EnforcementMode enum. */ - enum EnforcementMode { - ENFORCEMENT_MODE_UNSPECIFIED = 0, - PREVENTIVE = 1, - DETECTIVE = 2, - AUDIT = 3 - } - - /** FrameworkCategory enum. */ - enum FrameworkCategory { - FRAMEWORK_CATEGORY_UNSPECIFIED = 0, - INDUSTRY_DEFINED_STANDARD = 1, - ASSURED_WORKLOADS = 2, - DATA_SECURITY = 3, - GOOGLE_BEST_PRACTICES = 4, - CUSTOM_FRAMEWORK = 5 - } - - /** CloudControlCategory enum. */ - enum CloudControlCategory { - CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0, - CC_CATEGORY_INFRASTRUCTURE = 1, - CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2, - CC_CATEGORY_PHYSICAL_SECURITY = 3, - CC_CATEGORY_DATA_SECURITY = 4, - CC_CATEGORY_NETWORK_SECURITY = 5, - CC_CATEGORY_INCIDENT_MANAGEMENT = 6, - CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7, - CC_CATEGORY_ENCRYPTION = 8, - CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9, - CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10, - CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11, - CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12, - CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13, - CC_CATEGORY_PRIVACY = 14, - CC_CATEGORY_BCDR = 15, - CC_CATEGORY_ADMIN_ACCESS = 16, - CC_CATEGORY_DATA_RESIDENCY = 17, - CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18, - CC_CATEGORY_SERVICE_SPECIFIC = 19 - } - - /** CloudProvider enum. */ - enum CloudProvider { - CLOUD_PROVIDER_UNSPECIFIED = 0, - AWS = 1, - AZURE = 2, - GCP = 3 - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - CRITICAL = 1, - HIGH = 2, - MEDIUM = 3, - LOW = 4 - } - - /** RuleActionType enum. */ - enum RuleActionType { - RULE_ACTION_TYPE_UNSPECIFIED = 0, - RULE_ACTION_TYPE_PREVENTIVE = 1, - RULE_ACTION_TYPE_DETECTIVE = 2, - RULE_ACTION_TYPE_AUDIT = 3 - } - - /** TargetResourceType enum. */ - enum TargetResourceType { - TARGET_RESOURCE_TYPE_UNSPECIFIED = 0, - TARGET_RESOURCE_CRM_TYPE_ORG = 1, - TARGET_RESOURCE_CRM_TYPE_FOLDER = 2, - TARGET_RESOURCE_CRM_TYPE_PROJECT = 3, - TARGET_RESOURCE_TYPE_APPLICATION = 4 - } - - /** Properties of a Framework. */ - interface IFramework { - - /** Framework name */ - name?: (string|null); - - /** Framework majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** Framework displayName */ - displayName?: (string|null); - - /** Framework description */ - description?: (string|null); - - /** Framework type */ - type?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); - - /** Framework cloudControlDetails */ - cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]|null); - - /** Framework category */ - category?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); - - /** Framework supportedCloudProviders */ - supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); - - /** Framework supportedTargetResourceTypes */ - supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); - - /** Framework supportedEnforcementModes */ - supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); - } - - /** Represents a Framework. */ - class Framework implements IFramework { - - /** - * Constructs a new Framework. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework); - - /** Framework name. */ - public name: string; - - /** Framework majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** Framework displayName. */ - public displayName: string; - - /** Framework description. */ - public description: string; - - /** Framework type. */ - public type: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); - - /** Framework cloudControlDetails. */ - public cloudControlDetails: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails[]; - - /** Framework category. */ - public category: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; - - /** Framework supportedCloudProviders. */ - public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; - - /** Framework supportedTargetResourceTypes. */ - public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; - - /** Framework supportedEnforcementModes. */ - public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; - - /** - * Creates a new Framework instance using the specified properties. - * @param [properties] Properties to set - * @returns Framework instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFramework): google.cloud.cloudsecuritycompliance.v1.Framework; - - /** - * Encodes the specified Framework message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. - * @param message Framework message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Framework message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. - * @param message Framework message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFramework, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Framework message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Framework - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Framework; - - /** - * Decodes a Framework message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Framework - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Framework; - - /** - * Verifies a Framework message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Framework message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Framework - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Framework; - - /** - * Creates a plain object from a Framework message. Also converts values to other types if specified. - * @param message Framework - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Framework, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Framework to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Framework - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Framework { - - /** FrameworkType enum. */ - enum FrameworkType { - FRAMEWORK_TYPE_UNSPECIFIED = 0, - BUILT_IN = 1, - CUSTOM = 2 - } - } - - /** Properties of a CloudControlDetails. */ - interface ICloudControlDetails { - - /** CloudControlDetails name */ - name?: (string|null); - - /** CloudControlDetails majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** CloudControlDetails parameters */ - parameters?: (google.cloud.cloudsecuritycompliance.v1.IParameter[]|null); - } - - /** Represents a CloudControlDetails. */ - class CloudControlDetails implements ICloudControlDetails { - - /** - * Constructs a new CloudControlDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails); - - /** CloudControlDetails name. */ - public name: string; - - /** CloudControlDetails majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** CloudControlDetails parameters. */ - public parameters: google.cloud.cloudsecuritycompliance.v1.IParameter[]; - - /** - * Creates a new CloudControlDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; - - /** - * Encodes the specified CloudControlDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. - * @param message CloudControlDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. - * @param message CloudControlDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; - - /** - * Decodes a CloudControlDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; - - /** - * Verifies a CloudControlDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDetails; - - /** - * Creates a plain object from a CloudControlDetails message. Also converts values to other types if specified. - * @param message CloudControlDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FrameworkReference. */ - interface IFrameworkReference { - - /** FrameworkReference framework */ - framework?: (string|null); - - /** FrameworkReference majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - } - - /** Represents a FrameworkReference. */ - class FrameworkReference implements IFrameworkReference { - - /** - * Constructs a new FrameworkReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference); - - /** FrameworkReference framework. */ - public framework: string; - - /** FrameworkReference majorRevisionId. */ - public majorRevisionId?: (number|Long|string|null); - - /** - * Creates a new FrameworkReference instance using the specified properties. - * @param [properties] Properties to set - * @returns FrameworkReference instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; - - /** - * Encodes the specified FrameworkReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. - * @param message FrameworkReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FrameworkReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. - * @param message FrameworkReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FrameworkReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FrameworkReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; - - /** - * Decodes a FrameworkReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FrameworkReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; - - /** - * Verifies a FrameworkReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FrameworkReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FrameworkReference - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkReference; - - /** - * Creates a plain object from a FrameworkReference message. Also converts values to other types if specified. - * @param message FrameworkReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FrameworkReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FrameworkReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Parameter. */ - interface IParameter { - - /** Parameter name */ - name?: (string|null); - - /** Parameter parameterValue */ - parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); - } - - /** Represents a Parameter. */ - class Parameter implements IParameter { - - /** - * Constructs a new Parameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter); - - /** Parameter name. */ - public name: string; - - /** Parameter parameterValue. */ - public parameterValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); - - /** - * Creates a new Parameter instance using the specified properties. - * @param [properties] Properties to set - * @returns Parameter instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameter): google.cloud.cloudsecuritycompliance.v1.Parameter; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Parameter; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Parameter; - - /** - * Verifies a Parameter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Parameter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Parameter; - - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Parameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Parameter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControl. */ - interface ICloudControl { - - /** CloudControl name */ - name?: (string|null); - - /** CloudControl majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** CloudControl description */ - description?: (string|null); - - /** CloudControl displayName */ - displayName?: (string|null); - - /** CloudControl supportedEnforcementModes */ - supportedEnforcementModes?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]|null); - - /** CloudControl parameterSpec */ - parameterSpec?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); - - /** CloudControl rules */ - rules?: (google.cloud.cloudsecuritycompliance.v1.IRule[]|null); - - /** CloudControl severity */ - severity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); - - /** CloudControl findingCategory */ - findingCategory?: (string|null); - - /** CloudControl supportedCloudProviders */ - supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); - - /** CloudControl relatedFrameworks */ - relatedFrameworks?: (string[]|null); - - /** CloudControl remediationSteps */ - remediationSteps?: (string|null); - - /** CloudControl categories */ - categories?: (google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]|null); - - /** CloudControl createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** CloudControl supportedTargetResourceTypes */ - supportedTargetResourceTypes?: (google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]|null); - } - - /** Represents a CloudControl. */ - class CloudControl implements ICloudControl { - - /** - * Constructs a new CloudControl. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl); - - /** CloudControl name. */ - public name: string; - - /** CloudControl majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** CloudControl description. */ - public description: string; - - /** CloudControl displayName. */ - public displayName: string; - - /** CloudControl supportedEnforcementModes. */ - public supportedEnforcementModes: google.cloud.cloudsecuritycompliance.v1.EnforcementMode[]; - - /** CloudControl parameterSpec. */ - public parameterSpec: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; - - /** CloudControl rules. */ - public rules: google.cloud.cloudsecuritycompliance.v1.IRule[]; - - /** CloudControl severity. */ - public severity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); - - /** CloudControl findingCategory. */ - public findingCategory: string; - - /** CloudControl supportedCloudProviders. */ - public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; - - /** CloudControl relatedFrameworks. */ - public relatedFrameworks: string[]; - - /** CloudControl remediationSteps. */ - public remediationSteps: string; - - /** CloudControl categories. */ - public categories: google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[]; - - /** CloudControl createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** CloudControl supportedTargetResourceTypes. */ - public supportedTargetResourceTypes: google.cloud.cloudsecuritycompliance.v1.TargetResourceType[]; - - /** - * Creates a new CloudControl instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControl instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControl): google.cloud.cloudsecuritycompliance.v1.CloudControl; - - /** - * Encodes the specified CloudControl message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. - * @param message CloudControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControl message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. - * @param message CloudControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControl message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControl; - - /** - * Decodes a CloudControl message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControl; - - /** - * Verifies a CloudControl message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControl message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControl - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControl; - - /** - * Creates a plain object from a CloudControl message. Also converts values to other types if specified. - * @param message CloudControl - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControl to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControl - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudControl { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CUSTOM = 1, - BUILT_IN = 2 - } - } - - /** Properties of a ParameterSpec. */ - interface IParameterSpec { - - /** ParameterSpec name */ - name?: (string|null); - - /** ParameterSpec displayName */ - displayName?: (string|null); - - /** ParameterSpec description */ - description?: (string|null); - - /** ParameterSpec isRequired */ - isRequired?: (boolean|null); - - /** ParameterSpec valueType */ - valueType?: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|null); - - /** ParameterSpec defaultValue */ - defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); - - /** ParameterSpec substitutionRules */ - substitutionRules?: (google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]|null); - - /** ParameterSpec subParameters */ - subParameters?: (google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]|null); - - /** ParameterSpec validation */ - validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); - } - - /** Represents a ParameterSpec. */ - class ParameterSpec implements IParameterSpec { - - /** - * Constructs a new ParameterSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec); - - /** ParameterSpec name. */ - public name: string; - - /** ParameterSpec displayName. */ - public displayName: string; - - /** ParameterSpec description. */ - public description: string; - - /** ParameterSpec isRequired. */ - public isRequired: boolean; - - /** ParameterSpec valueType. */ - public valueType: (google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|keyof typeof google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType); - - /** ParameterSpec defaultValue. */ - public defaultValue?: (google.cloud.cloudsecuritycompliance.v1.IParamValue|null); - - /** ParameterSpec substitutionRules. */ - public substitutionRules: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule[]; - - /** ParameterSpec subParameters. */ - public subParameters: google.cloud.cloudsecuritycompliance.v1.IParameterSpec[]; - - /** ParameterSpec validation. */ - public validation?: (google.cloud.cloudsecuritycompliance.v1.IValidation|null); - - /** - * Creates a new ParameterSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ParameterSpec instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSpec): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; - - /** - * Encodes the specified ParameterSpec message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. - * @param message ParameterSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParameterSpec message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. - * @param message ParameterSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParameterSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParameterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; - - /** - * Decodes a ParameterSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParameterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; - - /** - * Verifies a ParameterSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParameterSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParameterSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSpec; - - /** - * Creates a plain object from a ParameterSpec message. Also converts values to other types if specified. - * @param message ParameterSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParameterSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ParameterSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ParameterSpec { - - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - STRING = 3, - BOOLEAN = 4, - STRINGLIST = 5, - NUMBER = 6, - ONEOF = 7 - } - } - - /** Properties of a Validation. */ - interface IValidation { - - /** Validation allowedValues */ - allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); - - /** Validation intRange */ - intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); - - /** Validation regexpPattern */ - regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); - } - - /** Represents a Validation. */ - class Validation implements IValidation { - - /** - * Constructs a new Validation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation); - - /** Validation allowedValues. */ - public allowedValues?: (google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null); - - /** Validation intRange. */ - public intRange?: (google.cloud.cloudsecuritycompliance.v1.IIntRange|null); - - /** Validation regexpPattern. */ - public regexpPattern?: (google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null); - - /** Validation constraint. */ - public constraint?: ("allowedValues"|"intRange"|"regexpPattern"); - - /** - * Creates a new Validation instance using the specified properties. - * @param [properties] Properties to set - * @returns Validation instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IValidation): google.cloud.cloudsecuritycompliance.v1.Validation; - - /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Validation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Validation; - - /** - * Decodes a Validation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Validation; - - /** - * Verifies a Validation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Validation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Validation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Validation; - - /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @param message Validation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Validation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Validation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AllowedValues. */ - interface IAllowedValues { - - /** AllowedValues values */ - values?: (google.cloud.cloudsecuritycompliance.v1.IParamValue[]|null); - } - - /** Represents an AllowedValues. */ - class AllowedValues implements IAllowedValues { - - /** - * Constructs a new AllowedValues. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues); - - /** AllowedValues values. */ - public values: google.cloud.cloudsecuritycompliance.v1.IParamValue[]; - - /** - * Creates a new AllowedValues instance using the specified properties. - * @param [properties] Properties to set - * @returns AllowedValues instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAllowedValues): google.cloud.cloudsecuritycompliance.v1.AllowedValues; - - /** - * Encodes the specified AllowedValues message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. - * @param message AllowedValues message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AllowedValues message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. - * @param message AllowedValues message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAllowedValues, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AllowedValues message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllowedValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AllowedValues; - - /** - * Decodes an AllowedValues message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllowedValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AllowedValues; - - /** - * Verifies an AllowedValues message. - * @param message Plain 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 AllowedValues message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllowedValues - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AllowedValues; - - /** - * Creates a plain object from an AllowedValues message. Also converts values to other types if specified. - * @param message AllowedValues - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AllowedValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AllowedValues to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AllowedValues - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RegexpPattern. */ - interface IRegexpPattern { - - /** RegexpPattern pattern */ - pattern?: (string|null); - } - - /** Represents a RegexpPattern. */ - class RegexpPattern implements IRegexpPattern { - - /** - * Constructs a new RegexpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern); - - /** RegexpPattern pattern. */ - public pattern: string; - - /** - * Creates a new RegexpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns RegexpPattern instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; - - /** - * Encodes the specified RegexpPattern message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. - * @param message RegexpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegexpPattern message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. - * @param message RegexpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRegexpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegexpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegexpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; - - /** - * Decodes a RegexpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegexpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; - - /** - * Verifies a RegexpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RegexpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegexpPattern - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.RegexpPattern; - - /** - * Creates a plain object from a RegexpPattern message. Also converts values to other types if specified. - * @param message RegexpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.RegexpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegexpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RegexpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IntRange. */ - interface IIntRange { - - /** IntRange min */ - min?: (number|Long|string|null); - - /** IntRange max */ - max?: (number|Long|string|null); - } - - /** Represents an IntRange. */ - class IntRange implements IIntRange { - - /** - * Constructs a new IntRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange); - - /** IntRange min. */ - public min: (number|Long|string); - - /** IntRange max. */ - public max: (number|Long|string); - - /** - * Creates a new IntRange instance using the specified properties. - * @param [properties] Properties to set - * @returns IntRange instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IIntRange): google.cloud.cloudsecuritycompliance.v1.IntRange; - - /** - * Encodes the specified IntRange message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. - * @param message IntRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntRange message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. - * @param message IntRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IIntRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IntRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.IntRange; - - /** - * Decodes an IntRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.IntRange; - - /** - * Verifies an IntRange message. - * @param message Plain 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 IntRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntRange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.IntRange; - - /** - * Creates a plain object from an IntRange message. Also converts values to other types if specified. - * @param message IntRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.IntRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IntRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IntRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringList. */ - interface IStringList { - - /** StringList values */ - values?: (string[]|null); - } - - /** Represents a StringList. */ - class StringList implements IStringList { - - /** - * Constructs a new StringList. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList); - - /** StringList values. */ - public values: string[]; - - /** - * Creates a new StringList instance using the specified properties. - * @param [properties] Properties to set - * @returns StringList instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IStringList): google.cloud.cloudsecuritycompliance.v1.StringList; - - /** - * Encodes the specified StringList message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. - * @param message StringList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. - * @param message StringList message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IStringList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringList message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.StringList; - - /** - * Decodes a StringList message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.StringList; - - /** - * Verifies a StringList message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringList message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringList - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.StringList; - - /** - * Creates a plain object from a StringList message. Also converts values to other types if specified. - * @param message StringList - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.StringList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringList to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringList - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ParamValue. */ - interface IParamValue { - - /** ParamValue stringValue */ - stringValue?: (string|null); - - /** ParamValue boolValue */ - boolValue?: (boolean|null); - - /** ParamValue stringListValue */ - stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); - - /** ParamValue numberValue */ - numberValue?: (number|null); - - /** ParamValue oneofValue */ - oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); - } - - /** Represents a ParamValue. */ - class ParamValue implements IParamValue { - - /** - * Constructs a new ParamValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue); - - /** ParamValue stringValue. */ - public stringValue?: (string|null); - - /** ParamValue boolValue. */ - public boolValue?: (boolean|null); - - /** ParamValue stringListValue. */ - public stringListValue?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); - - /** ParamValue numberValue. */ - public numberValue?: (number|null); - - /** ParamValue oneofValue. */ - public oneofValue?: (google.cloud.cloudsecuritycompliance.v1.IParameter|null); - - /** ParamValue kind. */ - public kind?: ("stringValue"|"boolValue"|"stringListValue"|"numberValue"|"oneofValue"); - - /** - * Creates a new ParamValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ParamValue instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParamValue): google.cloud.cloudsecuritycompliance.v1.ParamValue; - - /** - * Encodes the specified ParamValue message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. - * @param message ParamValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParamValue message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. - * @param message ParamValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParamValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParamValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParamValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ParamValue; - - /** - * Decodes a ParamValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParamValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ParamValue; - - /** - * Verifies a ParamValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParamValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParamValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParamValue; - - /** - * Creates a plain object from a ParamValue message. Also converts values to other types if specified. - * @param message ParamValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParamValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParamValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ParamValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ParameterSubstitutionRule. */ - interface IParameterSubstitutionRule { - - /** ParameterSubstitutionRule placeholderSubstitutionRule */ - placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); - - /** ParameterSubstitutionRule attributeSubstitutionRule */ - attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); - } - - /** Represents a ParameterSubstitutionRule. */ - class ParameterSubstitutionRule implements IParameterSubstitutionRule { - - /** - * Constructs a new ParameterSubstitutionRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule); - - /** ParameterSubstitutionRule placeholderSubstitutionRule. */ - public placeholderSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null); - - /** ParameterSubstitutionRule attributeSubstitutionRule. */ - public attributeSubstitutionRule?: (google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null); - - /** ParameterSubstitutionRule substitutionType. */ - public substitutionType?: ("placeholderSubstitutionRule"|"attributeSubstitutionRule"); - - /** - * Creates a new ParameterSubstitutionRule instance using the specified properties. - * @param [properties] Properties to set - * @returns ParameterSubstitutionRule instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; - - /** - * Encodes the specified ParameterSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. - * @param message ParameterSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParameterSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. - * @param message ParameterSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParameterSubstitutionRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParameterSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; - - /** - * Decodes a ParameterSubstitutionRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParameterSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; - - /** - * Verifies a ParameterSubstitutionRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParameterSubstitutionRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParameterSubstitutionRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule; - - /** - * Creates a plain object from a ParameterSubstitutionRule message. Also converts values to other types if specified. - * @param message ParameterSubstitutionRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParameterSubstitutionRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ParameterSubstitutionRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AttributeSubstitutionRule. */ - interface IAttributeSubstitutionRule { - - /** AttributeSubstitutionRule attribute */ - attribute?: (string|null); - } - - /** Represents an AttributeSubstitutionRule. */ - class AttributeSubstitutionRule implements IAttributeSubstitutionRule { - - /** - * Constructs a new AttributeSubstitutionRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule); - - /** AttributeSubstitutionRule attribute. */ - public attribute: string; - - /** - * Creates a new AttributeSubstitutionRule instance using the specified properties. - * @param [properties] Properties to set - * @returns AttributeSubstitutionRule instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; - - /** - * Encodes the specified AttributeSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. - * @param message AttributeSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AttributeSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. - * @param message AttributeSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AttributeSubstitutionRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AttributeSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; - - /** - * Decodes an AttributeSubstitutionRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AttributeSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; - - /** - * Verifies an AttributeSubstitutionRule message. - * @param message Plain 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 AttributeSubstitutionRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AttributeSubstitutionRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule; - - /** - * Creates a plain object from an AttributeSubstitutionRule message. Also converts values to other types if specified. - * @param message AttributeSubstitutionRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AttributeSubstitutionRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AttributeSubstitutionRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PlaceholderSubstitutionRule. */ - interface IPlaceholderSubstitutionRule { - - /** PlaceholderSubstitutionRule attribute */ - attribute?: (string|null); - } - - /** Represents a PlaceholderSubstitutionRule. */ - class PlaceholderSubstitutionRule implements IPlaceholderSubstitutionRule { - - /** - * Constructs a new PlaceholderSubstitutionRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule); - - /** PlaceholderSubstitutionRule attribute. */ - public attribute: string; - - /** - * Creates a new PlaceholderSubstitutionRule instance using the specified properties. - * @param [properties] Properties to set - * @returns PlaceholderSubstitutionRule instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; - - /** - * Encodes the specified PlaceholderSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. - * @param message PlaceholderSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlaceholderSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. - * @param message PlaceholderSubstitutionRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlaceholderSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; - - /** - * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlaceholderSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; - - /** - * Verifies a PlaceholderSubstitutionRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlaceholderSubstitutionRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlaceholderSubstitutionRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule; - - /** - * Creates a plain object from a PlaceholderSubstitutionRule message. Also converts values to other types if specified. - * @param message PlaceholderSubstitutionRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlaceholderSubstitutionRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PlaceholderSubstitutionRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Rule. */ - interface IRule { - - /** Rule celExpression */ - celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); - - /** Rule description */ - description?: (string|null); - - /** Rule ruleActionTypes */ - ruleActionTypes?: (google.cloud.cloudsecuritycompliance.v1.RuleActionType[]|null); - } - - /** Represents a Rule. */ - class Rule implements IRule { - - /** - * Constructs a new Rule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IRule); - - /** Rule celExpression. */ - public celExpression?: (google.cloud.cloudsecuritycompliance.v1.ICELExpression|null); - - /** Rule description. */ - public description: string; - - /** Rule ruleActionTypes. */ - public ruleActionTypes: google.cloud.cloudsecuritycompliance.v1.RuleActionType[]; - - /** Rule implementation. */ - public implementation?: "celExpression"; - - /** - * Creates a new Rule instance using the specified properties. - * @param [properties] Properties to set - * @returns Rule instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IRule): google.cloud.cloudsecuritycompliance.v1.Rule; - - /** - * Encodes the specified Rule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Rule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Rule; - - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Rule; - - /** - * Verifies a Rule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Rule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Rule; - - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @param message Rule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Rule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Rule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CELExpression. */ - interface ICELExpression { - - /** CELExpression resourceTypesValues */ - resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); - - /** CELExpression expression */ - expression?: (string|null); - } - - /** Represents a CELExpression. */ - class CELExpression implements ICELExpression { - - /** - * Constructs a new CELExpression. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression); - - /** CELExpression resourceTypesValues. */ - public resourceTypesValues?: (google.cloud.cloudsecuritycompliance.v1.IStringList|null); - - /** CELExpression expression. */ - public expression: string; - - /** CELExpression criteria. */ - public criteria?: "resourceTypesValues"; - - /** - * Creates a new CELExpression instance using the specified properties. - * @param [properties] Properties to set - * @returns CELExpression instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICELExpression): google.cloud.cloudsecuritycompliance.v1.CELExpression; - - /** - * Encodes the specified CELExpression message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. - * @param message CELExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CELExpression message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. - * @param message CELExpression message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICELExpression, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CELExpression message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CELExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CELExpression; - - /** - * Decodes a CELExpression message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CELExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CELExpression; - - /** - * Verifies a CELExpression message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CELExpression message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CELExpression - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CELExpression; - - /** - * Creates a plain object from a CELExpression message. Also converts values to other types if specified. - * @param message CELExpression - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CELExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CELExpression to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CELExpression - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.IOperationMetadata): google.cloud.cloudsecuritycompliance.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationMetadata to JSON. - * @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; - } - - /** Properties of a Control. */ - interface IControl { - - /** Control name */ - name?: (string|null); - - /** Control displayName */ - displayName?: (string|null); - - /** Control description */ - description?: (string|null); - - /** Control family */ - family?: (google.cloud.cloudsecuritycompliance.v1.Control.Family|keyof typeof google.cloud.cloudsecuritycompliance.v1.Control.Family|null); - - /** Control controlFamily */ - controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); - - /** Control responsibilityType */ - responsibilityType?: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null); - - /** Control googleResponsibilityDescription */ - googleResponsibilityDescription?: (string|null); - - /** Control googleResponsibilityImplementation */ - googleResponsibilityImplementation?: (string|null); - - /** Control customerResponsibilityDescription */ - customerResponsibilityDescription?: (string|null); - - /** Control customerResponsibilityImplementation */ - customerResponsibilityImplementation?: (string|null); - - /** Control sharedResponsibilityDescription */ - sharedResponsibilityDescription?: (string|null); - - /** Control additionalContentUri */ - additionalContentUri?: (string|null); - - /** Control relatedFrameworks */ - relatedFrameworks?: (string[]|null); - } - - /** Represents a Control. */ - class Control implements IControl { - - /** - * Constructs a new Control. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControl); - - /** Control name. */ - public name: string; - - /** Control displayName. */ - public displayName: string; - - /** Control description. */ - public description: string; - - /** Control family. */ - public family: (google.cloud.cloudsecuritycompliance.v1.Control.Family|keyof typeof google.cloud.cloudsecuritycompliance.v1.Control.Family); - - /** Control controlFamily. */ - public controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); - - /** Control responsibilityType. */ - public responsibilityType: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType); - - /** Control googleResponsibilityDescription. */ - public googleResponsibilityDescription: string; - - /** Control googleResponsibilityImplementation. */ - public googleResponsibilityImplementation: string; - - /** Control customerResponsibilityDescription. */ - public customerResponsibilityDescription: string; - - /** Control customerResponsibilityImplementation. */ - public customerResponsibilityImplementation: string; - - /** Control sharedResponsibilityDescription. */ - public sharedResponsibilityDescription: string; - - /** Control additionalContentUri. */ - public additionalContentUri: string; - - /** Control relatedFrameworks. */ - public relatedFrameworks: string[]; - - /** - * Creates a new Control instance using the specified properties. - * @param [properties] Properties to set - * @returns Control instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControl): google.cloud.cloudsecuritycompliance.v1.Control; - - /** - * Encodes the specified Control message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. - * @param message Control message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Control message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. - * @param message Control message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Control message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Control - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Control; - - /** - * Decodes a Control message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Control - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Control; - - /** - * Verifies a Control message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Control message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Control - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Control; - - /** - * Creates a plain object from a Control message. Also converts values to other types if specified. - * @param message Control - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Control, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Control to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Control - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Control { - - /** Family enum. */ - enum Family { - FAMILY_UNSPECIFIED = 0, - AC = 1, - AT = 2, - AU = 3, - CA = 4, - CM = 5, - CP = 6, - IA = 7, - IR = 8, - MA = 9, - MP = 10, - PE = 11, - PL = 12, - PS = 13, - RA = 14, - SA = 15, - SC = 16, - SI = 17, - SR = 18 - } - } - - /** Properties of a ControlFamily. */ - interface IControlFamily { - - /** ControlFamily familyId */ - familyId?: (string|null); - - /** ControlFamily displayName */ - displayName?: (string|null); - } - - /** Represents a ControlFamily. */ - class ControlFamily implements IControlFamily { - - /** - * Constructs a new ControlFamily. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlFamily); - - /** ControlFamily familyId. */ - public familyId: string; - - /** ControlFamily displayName. */ - public displayName: string; - - /** - * Creates a new ControlFamily instance using the specified properties. - * @param [properties] Properties to set - * @returns ControlFamily instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlFamily): google.cloud.cloudsecuritycompliance.v1.ControlFamily; - - /** - * Encodes the specified ControlFamily message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. - * @param message ControlFamily message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlFamily, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ControlFamily message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. - * @param message ControlFamily message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlFamily, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ControlFamily message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ControlFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlFamily; - - /** - * Decodes a ControlFamily message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ControlFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlFamily; - - /** - * Verifies a ControlFamily message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ControlFamily message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ControlFamily - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlFamily; - - /** - * Creates a plain object from a ControlFamily message. Also converts values to other types if specified. - * @param message ControlFamily - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ControlFamily to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ControlFamily - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a CmEnrollmentService */ - class CmEnrollmentService extends $protobuf.rpc.Service { - - /** - * Constructs a new CmEnrollmentService 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 CmEnrollmentService 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): CmEnrollmentService; - - /** - * Calls UpdateCmEnrollment. - * @param request UpdateCmEnrollmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CmEnrollment - */ - public updateCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, callback: google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollmentCallback): void; - - /** - * Calls UpdateCmEnrollment. - * @param request UpdateCmEnrollmentRequest message or plain object - * @returns Promise - */ - public updateCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest): Promise; - - /** - * Calls CalculateEffectiveCmEnrollment. - * @param request CalculateEffectiveCmEnrollmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CalculateEffectiveCmEnrollmentResponse - */ - public calculateEffectiveCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, callback: google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollmentCallback): void; - - /** - * Calls CalculateEffectiveCmEnrollment. - * @param request CalculateEffectiveCmEnrollmentRequest message or plain object - * @returns Promise - */ - public calculateEffectiveCmEnrollment(request: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest): Promise; - } - - namespace CmEnrollmentService { - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|updateCmEnrollment}. - * @param error Error, if any - * @param [response] CmEnrollment - */ - type UpdateCmEnrollmentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CmEnrollment) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|calculateEffectiveCmEnrollment}. - * @param error Error, if any - * @param [response] CalculateEffectiveCmEnrollmentResponse - */ - type CalculateEffectiveCmEnrollmentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse) => void; - } - - /** Properties of an UpdateCmEnrollmentRequest. */ - interface IUpdateCmEnrollmentRequest { - - /** UpdateCmEnrollmentRequest cmEnrollment */ - cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); - - /** UpdateCmEnrollmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateCmEnrollmentRequest. */ - class UpdateCmEnrollmentRequest implements IUpdateCmEnrollmentRequest { - - /** - * Constructs a new UpdateCmEnrollmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest); - - /** UpdateCmEnrollmentRequest cmEnrollment. */ - public cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); - - /** UpdateCmEnrollmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateCmEnrollmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateCmEnrollmentRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; - - /** - * Encodes the specified UpdateCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. - * @param message UpdateCmEnrollmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. - * @param message UpdateCmEnrollmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; - - /** - * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; - - /** - * Verifies an UpdateCmEnrollmentRequest message. - * @param message Plain 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 UpdateCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateCmEnrollmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest; - - /** - * Creates a plain object from an UpdateCmEnrollmentRequest message. Also converts values to other types if specified. - * @param message UpdateCmEnrollmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateCmEnrollmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateCmEnrollmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CalculateEffectiveCmEnrollmentRequest. */ - interface ICalculateEffectiveCmEnrollmentRequest { - - /** CalculateEffectiveCmEnrollmentRequest name */ - name?: (string|null); - } - - /** Represents a CalculateEffectiveCmEnrollmentRequest. */ - class CalculateEffectiveCmEnrollmentRequest implements ICalculateEffectiveCmEnrollmentRequest { - - /** - * Constructs a new CalculateEffectiveCmEnrollmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest); - - /** CalculateEffectiveCmEnrollmentRequest name. */ - public name: string; - - /** - * Creates a new CalculateEffectiveCmEnrollmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CalculateEffectiveCmEnrollmentRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; - - /** - * Encodes the specified CalculateEffectiveCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. - * @param message CalculateEffectiveCmEnrollmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CalculateEffectiveCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. - * @param message CalculateEffectiveCmEnrollmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CalculateEffectiveCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; - - /** - * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CalculateEffectiveCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; - - /** - * Verifies a CalculateEffectiveCmEnrollmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CalculateEffectiveCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CalculateEffectiveCmEnrollmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest; - - /** - * Creates a plain object from a CalculateEffectiveCmEnrollmentRequest message. Also converts values to other types if specified. - * @param message CalculateEffectiveCmEnrollmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CalculateEffectiveCmEnrollmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CalculateEffectiveCmEnrollmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CmEnrollment. */ - interface ICmEnrollment { - - /** CmEnrollment name */ - name?: (string|null); - - /** CmEnrollment enrolled */ - enrolled?: (boolean|null); - - /** CmEnrollment auditConfig */ - auditConfig?: (google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null); - } - - /** Represents a CmEnrollment. */ - class CmEnrollment implements ICmEnrollment { - - /** - * Constructs a new CmEnrollment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment); - - /** CmEnrollment name. */ - public name: string; - - /** CmEnrollment enrolled. */ - public enrolled: boolean; - - /** CmEnrollment auditConfig. */ - public auditConfig?: (google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null); - - /** - * Creates a new CmEnrollment instance using the specified properties. - * @param [properties] Properties to set - * @returns CmEnrollment instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; - - /** - * Encodes the specified CmEnrollment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. - * @param message CmEnrollment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CmEnrollment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. - * @param message CmEnrollment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CmEnrollment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CmEnrollment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; - - /** - * Decodes a CmEnrollment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CmEnrollment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; - - /** - * Verifies a CmEnrollment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CmEnrollment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CmEnrollment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CmEnrollment; - - /** - * Creates a plain object from a CmEnrollment message. Also converts values to other types if specified. - * @param message CmEnrollment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CmEnrollment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CmEnrollment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CmEnrollment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CalculateEffectiveCmEnrollmentResponse. */ - interface ICalculateEffectiveCmEnrollmentResponse { - - /** CalculateEffectiveCmEnrollmentResponse cmEnrollment */ - cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); - } - - /** Represents a CalculateEffectiveCmEnrollmentResponse. */ - class CalculateEffectiveCmEnrollmentResponse implements ICalculateEffectiveCmEnrollmentResponse { - - /** - * Constructs a new CalculateEffectiveCmEnrollmentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse); - - /** CalculateEffectiveCmEnrollmentResponse cmEnrollment. */ - public cmEnrollment?: (google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null); - - /** - * Creates a new CalculateEffectiveCmEnrollmentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CalculateEffectiveCmEnrollmentResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; - - /** - * Encodes the specified CalculateEffectiveCmEnrollmentResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. - * @param message CalculateEffectiveCmEnrollmentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CalculateEffectiveCmEnrollmentResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. - * @param message CalculateEffectiveCmEnrollmentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CalculateEffectiveCmEnrollmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; - - /** - * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CalculateEffectiveCmEnrollmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; - - /** - * Verifies a CalculateEffectiveCmEnrollmentResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CalculateEffectiveCmEnrollmentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CalculateEffectiveCmEnrollmentResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse; - - /** - * Creates a plain object from a CalculateEffectiveCmEnrollmentResponse message. Also converts values to other types if specified. - * @param message CalculateEffectiveCmEnrollmentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CalculateEffectiveCmEnrollmentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CalculateEffectiveCmEnrollmentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditConfig. */ - interface IAuditConfig { - - /** AuditConfig destinations */ - destinations?: (google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination[]|null); - } - - /** Represents an AuditConfig. */ - class AuditConfig implements IAuditConfig { - - /** - * Constructs a new AuditConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAuditConfig); - - /** AuditConfig destinations. */ - public destinations: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination[]; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfig instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAuditConfig): google.cloud.cloudsecuritycompliance.v1.AuditConfig; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AuditConfig; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AuditConfig; - - /** - * Verifies an AuditConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AuditConfig; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @param message AuditConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditConfig { - - /** Properties of a CmEligibleDestination. */ - interface ICmEligibleDestination { - - /** CmEligibleDestination gcsBucket */ - gcsBucket?: (string|null); - } - - /** Represents a CmEligibleDestination. */ - class CmEligibleDestination implements ICmEligibleDestination { - - /** - * Constructs a new CmEligibleDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination); - - /** CmEligibleDestination gcsBucket. */ - public gcsBucket?: (string|null); - - /** CmEligibleDestination cmEligibleDestinations. */ - public cmEligibleDestinations?: "gcsBucket"; - - /** - * Creates a new CmEligibleDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns CmEligibleDestination instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; - - /** - * Encodes the specified CmEligibleDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. - * @param message CmEligibleDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CmEligibleDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. - * @param message CmEligibleDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CmEligibleDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CmEligibleDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; - - /** - * Decodes a CmEligibleDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CmEligibleDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; - - /** - * Verifies a CmEligibleDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CmEligibleDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CmEligibleDestination - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination; - - /** - * Creates a plain object from a CmEligibleDestination message. Also converts values to other types if specified. - * @param message CmEligibleDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CmEligibleDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CmEligibleDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Represents a Config */ - class Config extends $protobuf.rpc.Service { - - /** - * Constructs a new Config 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 Config 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): Config; - - /** - * Calls ListFrameworks. - * @param request ListFrameworksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFrameworksResponse - */ - public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworksCallback): void; - - /** - * Calls ListFrameworks. - * @param request ListFrameworksRequest message or plain object - * @returns Promise - */ - public listFrameworks(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): Promise; - - /** - * Calls GetFramework. - * @param request GetFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Framework - */ - public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetFrameworkCallback): void; - - /** - * Calls GetFramework. - * @param request GetFrameworkRequest message or plain object - * @returns Promise - */ - public getFramework(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): Promise; - - /** - * Calls CreateFramework. - * @param request CreateFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Framework - */ - public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateFrameworkCallback): void; - - /** - * Calls CreateFramework. - * @param request CreateFrameworkRequest message or plain object - * @returns Promise - */ - public createFramework(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): Promise; - - /** - * Calls UpdateFramework. - * @param request UpdateFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Framework - */ - public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateFrameworkCallback): void; - - /** - * Calls UpdateFramework. - * @param request UpdateFrameworkRequest message or plain object - * @returns Promise - */ - public updateFramework(request: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): Promise; - - /** - * Calls DeleteFramework. - * @param request DeleteFrameworkRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteFrameworkCallback): void; - - /** - * Calls DeleteFramework. - * @param request DeleteFrameworkRequest message or plain object - * @returns Promise - */ - public deleteFramework(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): Promise; - - /** - * Calls ListCloudControls. - * @param request ListCloudControlsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCloudControlsResponse - */ - public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControlsCallback): void; - - /** - * Calls ListCloudControls. - * @param request ListCloudControlsRequest message or plain object - * @returns Promise - */ - public listCloudControls(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): Promise; - - /** - * Calls GetCloudControl. - * @param request GetCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControl - */ - public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControlCallback): void; - - /** - * Calls GetCloudControl. - * @param request GetCloudControlRequest message or plain object - * @returns Promise - */ - public getCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): Promise; - - /** - * Calls CreateCloudControl. - * @param request CreateCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControl - */ - public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControlCallback): void; - - /** - * Calls CreateCloudControl. - * @param request CreateCloudControlRequest message or plain object - * @returns Promise - */ - public createCloudControl(request: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): Promise; - - /** - * Calls UpdateCloudControl. - * @param request UpdateCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControl - */ - public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControlCallback): void; - - /** - * Calls UpdateCloudControl. - * @param request UpdateCloudControlRequest message or plain object - * @returns Promise - */ - public updateCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): Promise; - - /** - * Calls DeleteCloudControl. - * @param request DeleteCloudControlRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, callback: google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControlCallback): void; - - /** - * Calls DeleteCloudControl. - * @param request DeleteCloudControlRequest message or plain object - * @returns Promise - */ - public deleteCloudControl(request: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): Promise; - } - - namespace Config { - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listFrameworks}. - * @param error Error, if any - * @param [response] ListFrameworksResponse - */ - type ListFrameworksCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getFramework}. - * @param error Error, if any - * @param [response] Framework - */ - type GetFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createFramework}. - * @param error Error, if any - * @param [response] Framework - */ - type CreateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateFramework}. - * @param error Error, if any - * @param [response] Framework - */ - type UpdateFrameworkCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.Framework) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteFramework}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteFrameworkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listCloudControls}. - * @param error Error, if any - * @param [response] ListCloudControlsResponse - */ - type ListCloudControlsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getCloudControl}. - * @param error Error, if any - * @param [response] CloudControl - */ - type GetCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createCloudControl}. - * @param error Error, if any - * @param [response] CloudControl - */ - type CreateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateCloudControl}. - * @param error Error, if any - * @param [response] CloudControl - */ - type UpdateCloudControlCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControl) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteCloudControl}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteCloudControlCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a ListFrameworksRequest. */ - interface IListFrameworksRequest { - - /** ListFrameworksRequest parent */ - parent?: (string|null); - - /** ListFrameworksRequest pageSize */ - pageSize?: (number|null); - - /** ListFrameworksRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListFrameworksRequest. */ - class ListFrameworksRequest implements IListFrameworksRequest { - - /** - * Constructs a new ListFrameworksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest); - - /** ListFrameworksRequest parent. */ - public parent: string; - - /** ListFrameworksRequest pageSize. */ - public pageSize: number; - - /** ListFrameworksRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListFrameworksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworksRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; - - /** - * Encodes the specified ListFrameworksRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. - * @param message ListFrameworksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworksRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. - * @param message ListFrameworksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; - - /** - * Decodes a ListFrameworksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; - - /** - * Verifies a ListFrameworksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworksRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest; - - /** - * Creates a plain object from a ListFrameworksRequest message. Also converts values to other types if specified. - * @param message ListFrameworksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFrameworksResponse. */ - interface IListFrameworksResponse { - - /** ListFrameworksResponse frameworks */ - frameworks?: (google.cloud.cloudsecuritycompliance.v1.IFramework[]|null); - - /** ListFrameworksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFrameworksResponse. */ - class ListFrameworksResponse implements IListFrameworksResponse { - - /** - * Constructs a new ListFrameworksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse); - - /** ListFrameworksResponse frameworks. */ - public frameworks: google.cloud.cloudsecuritycompliance.v1.IFramework[]; - - /** ListFrameworksResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListFrameworksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworksResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; - - /** - * Encodes the specified ListFrameworksResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. - * @param message ListFrameworksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworksResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. - * @param message ListFrameworksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; - - /** - * Decodes a ListFrameworksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; - - /** - * Verifies a ListFrameworksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworksResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse; - - /** - * Creates a plain object from a ListFrameworksResponse message. Also converts values to other types if specified. - * @param message ListFrameworksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetFrameworkRequest. */ - interface IGetFrameworkRequest { - - /** GetFrameworkRequest name */ - name?: (string|null); - - /** GetFrameworkRequest majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - } - - /** Represents a GetFrameworkRequest. */ - class GetFrameworkRequest implements IGetFrameworkRequest { - - /** - * Constructs a new GetFrameworkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest); - - /** GetFrameworkRequest name. */ - public name: string; - - /** GetFrameworkRequest majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** - * Creates a new GetFrameworkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFrameworkRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; - - /** - * Encodes the specified GetFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. - * @param message GetFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. - * @param message GetFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetFrameworkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; - - /** - * Decodes a GetFrameworkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; - - /** - * Verifies a GetFrameworkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFrameworkRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest; - - /** - * Creates a plain object from a GetFrameworkRequest message. Also converts values to other types if specified. - * @param message GetFrameworkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetFrameworkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetFrameworkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateFrameworkRequest. */ - interface ICreateFrameworkRequest { - - /** CreateFrameworkRequest parent */ - parent?: (string|null); - - /** CreateFrameworkRequest frameworkId */ - frameworkId?: (string|null); - - /** CreateFrameworkRequest framework */ - framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); - } - - /** Represents a CreateFrameworkRequest. */ - class CreateFrameworkRequest implements ICreateFrameworkRequest { - - /** - * Constructs a new CreateFrameworkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest); - - /** CreateFrameworkRequest parent. */ - public parent: string; - - /** CreateFrameworkRequest frameworkId. */ - public frameworkId: string; - - /** CreateFrameworkRequest framework. */ - public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); - - /** - * Creates a new CreateFrameworkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateFrameworkRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; - - /** - * Encodes the specified CreateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. - * @param message CreateFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. - * @param message CreateFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateFrameworkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; - - /** - * Decodes a CreateFrameworkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; - - /** - * Verifies a CreateFrameworkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateFrameworkRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest; - - /** - * Creates a plain object from a CreateFrameworkRequest message. Also converts values to other types if specified. - * @param message CreateFrameworkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateFrameworkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateFrameworkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFrameworkRequest. */ - interface IUpdateFrameworkRequest { - - /** UpdateFrameworkRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateFrameworkRequest framework */ - framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); - - /** UpdateFrameworkRequest majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - } - - /** Represents an UpdateFrameworkRequest. */ - class UpdateFrameworkRequest implements IUpdateFrameworkRequest { - - /** - * Constructs a new UpdateFrameworkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest); - - /** UpdateFrameworkRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateFrameworkRequest framework. */ - public framework?: (google.cloud.cloudsecuritycompliance.v1.IFramework|null); - - /** UpdateFrameworkRequest majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** - * Creates a new UpdateFrameworkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFrameworkRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; - - /** - * Encodes the specified UpdateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. - * @param message UpdateFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. - * @param message UpdateFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFrameworkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; - - /** - * Decodes an UpdateFrameworkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; - - /** - * Verifies an UpdateFrameworkRequest message. - * @param message Plain 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 UpdateFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFrameworkRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest; - - /** - * Creates a plain object from an UpdateFrameworkRequest message. Also converts values to other types if specified. - * @param message UpdateFrameworkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFrameworkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFrameworkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteFrameworkRequest. */ - interface IDeleteFrameworkRequest { - - /** DeleteFrameworkRequest name */ - name?: (string|null); - } - - /** Represents a DeleteFrameworkRequest. */ - class DeleteFrameworkRequest implements IDeleteFrameworkRequest { - - /** - * Constructs a new DeleteFrameworkRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest); - - /** DeleteFrameworkRequest name. */ - public name: string; - - /** - * Creates a new DeleteFrameworkRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteFrameworkRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; - - /** - * Encodes the specified DeleteFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. - * @param message DeleteFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. - * @param message DeleteFrameworkRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteFrameworkRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; - - /** - * Decodes a DeleteFrameworkRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; - - /** - * Verifies a DeleteFrameworkRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteFrameworkRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest; - - /** - * Creates a plain object from a DeleteFrameworkRequest message. Also converts values to other types if specified. - * @param message DeleteFrameworkRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteFrameworkRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteFrameworkRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListCloudControlsRequest. */ - interface IListCloudControlsRequest { - - /** ListCloudControlsRequest parent */ - parent?: (string|null); - - /** ListCloudControlsRequest pageSize */ - pageSize?: (number|null); - - /** ListCloudControlsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListCloudControlsRequest. */ - class ListCloudControlsRequest implements IListCloudControlsRequest { - - /** - * Constructs a new ListCloudControlsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest); - - /** ListCloudControlsRequest parent. */ - public parent: string; - - /** ListCloudControlsRequest pageSize. */ - public pageSize: number; - - /** ListCloudControlsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListCloudControlsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListCloudControlsRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; - - /** - * Encodes the specified ListCloudControlsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. - * @param message ListCloudControlsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListCloudControlsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. - * @param message ListCloudControlsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListCloudControlsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListCloudControlsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; - - /** - * Decodes a ListCloudControlsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListCloudControlsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; - - /** - * Verifies a ListCloudControlsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListCloudControlsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListCloudControlsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest; - - /** - * Creates a plain object from a ListCloudControlsRequest message. Also converts values to other types if specified. - * @param message ListCloudControlsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListCloudControlsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListCloudControlsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListCloudControlsResponse. */ - interface IListCloudControlsResponse { - - /** ListCloudControlsResponse cloudControls */ - cloudControls?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl[]|null); - - /** ListCloudControlsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListCloudControlsResponse. */ - class ListCloudControlsResponse implements IListCloudControlsResponse { - - /** - * Constructs a new ListCloudControlsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse); - - /** ListCloudControlsResponse cloudControls. */ - public cloudControls: google.cloud.cloudsecuritycompliance.v1.ICloudControl[]; - - /** ListCloudControlsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListCloudControlsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListCloudControlsResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; - - /** - * Encodes the specified ListCloudControlsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. - * @param message ListCloudControlsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListCloudControlsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. - * @param message ListCloudControlsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListCloudControlsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListCloudControlsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; - - /** - * Decodes a ListCloudControlsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListCloudControlsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; - - /** - * Verifies a ListCloudControlsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListCloudControlsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListCloudControlsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse; - - /** - * Creates a plain object from a ListCloudControlsResponse message. Also converts values to other types if specified. - * @param message ListCloudControlsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListCloudControlsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListCloudControlsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetCloudControlRequest. */ - interface IGetCloudControlRequest { - - /** GetCloudControlRequest name */ - name?: (string|null); - - /** GetCloudControlRequest majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - } - - /** Represents a GetCloudControlRequest. */ - class GetCloudControlRequest implements IGetCloudControlRequest { - - /** - * Constructs a new GetCloudControlRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest); - - /** GetCloudControlRequest name. */ - public name: string; - - /** GetCloudControlRequest majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** - * Creates a new GetCloudControlRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCloudControlRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; - - /** - * Encodes the specified GetCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. - * @param message GetCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. - * @param message GetCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCloudControlRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; - - /** - * Decodes a GetCloudControlRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; - - /** - * Verifies a GetCloudControlRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCloudControlRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest; - - /** - * Creates a plain object from a GetCloudControlRequest message. Also converts values to other types if specified. - * @param message GetCloudControlRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCloudControlRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetCloudControlRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateCloudControlRequest. */ - interface ICreateCloudControlRequest { - - /** CreateCloudControlRequest parent */ - parent?: (string|null); - - /** CreateCloudControlRequest cloudControlId */ - cloudControlId?: (string|null); - - /** CreateCloudControlRequest cloudControl */ - cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); - } - - /** Represents a CreateCloudControlRequest. */ - class CreateCloudControlRequest implements ICreateCloudControlRequest { - - /** - * Constructs a new CreateCloudControlRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest); - - /** CreateCloudControlRequest parent. */ - public parent: string; - - /** CreateCloudControlRequest cloudControlId. */ - public cloudControlId: string; - - /** CreateCloudControlRequest cloudControl. */ - public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); - - /** - * Creates a new CreateCloudControlRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateCloudControlRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; - - /** - * Encodes the specified CreateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. - * @param message CreateCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. - * @param message CreateCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateCloudControlRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; - - /** - * Decodes a CreateCloudControlRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; - - /** - * Verifies a CreateCloudControlRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateCloudControlRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest; - - /** - * Creates a plain object from a CreateCloudControlRequest message. Also converts values to other types if specified. - * @param message CreateCloudControlRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateCloudControlRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateCloudControlRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateCloudControlRequest. */ - interface IUpdateCloudControlRequest { - - /** UpdateCloudControlRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateCloudControlRequest cloudControl */ - cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); - } - - /** Represents an UpdateCloudControlRequest. */ - class UpdateCloudControlRequest implements IUpdateCloudControlRequest { - - /** - * Constructs a new UpdateCloudControlRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest); - - /** UpdateCloudControlRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateCloudControlRequest cloudControl. */ - public cloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); - - /** - * Creates a new UpdateCloudControlRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateCloudControlRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; - - /** - * Encodes the specified UpdateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. - * @param message UpdateCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. - * @param message UpdateCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateCloudControlRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; - - /** - * Decodes an UpdateCloudControlRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; - - /** - * Verifies an UpdateCloudControlRequest message. - * @param message Plain 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 UpdateCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateCloudControlRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest; - - /** - * Creates a plain object from an UpdateCloudControlRequest message. Also converts values to other types if specified. - * @param message UpdateCloudControlRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateCloudControlRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateCloudControlRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteCloudControlRequest. */ - interface IDeleteCloudControlRequest { - - /** DeleteCloudControlRequest name */ - name?: (string|null); - } - - /** Represents a DeleteCloudControlRequest. */ - class DeleteCloudControlRequest implements IDeleteCloudControlRequest { - - /** - * Constructs a new DeleteCloudControlRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest); - - /** DeleteCloudControlRequest name. */ - public name: string; - - /** - * Creates a new DeleteCloudControlRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteCloudControlRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; - - /** - * Encodes the specified DeleteCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. - * @param message DeleteCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. - * @param message DeleteCloudControlRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteCloudControlRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; - - /** - * Decodes a DeleteCloudControlRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; - - /** - * Verifies a DeleteCloudControlRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteCloudControlRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest; - - /** - * Creates a plain object from a DeleteCloudControlRequest message. Also converts values to other types if specified. - * @param message DeleteCloudControlRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteCloudControlRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteCloudControlRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a Deployment */ - class Deployment extends $protobuf.rpc.Service { - - /** - * Constructs a new Deployment 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 Deployment 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): Deployment; - - /** - * Calls CreateFrameworkDeployment. - * @param request CreateFrameworkDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeploymentCallback): void; - - /** - * Calls CreateFrameworkDeployment. - * @param request CreateFrameworkDeploymentRequest message or plain object - * @returns Promise - */ - public createFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): Promise; - - /** - * Calls DeleteFrameworkDeployment. - * @param request DeleteFrameworkDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeploymentCallback): void; - - /** - * Calls DeleteFrameworkDeployment. - * @param request DeleteFrameworkDeploymentRequest message or plain object - * @returns Promise - */ - public deleteFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): Promise; - - /** - * Calls GetFrameworkDeployment. - * @param request GetFrameworkDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FrameworkDeployment - */ - public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeploymentCallback): void; - - /** - * Calls GetFrameworkDeployment. - * @param request GetFrameworkDeploymentRequest message or plain object - * @returns Promise - */ - public getFrameworkDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): Promise; - - /** - * Calls ListFrameworkDeployments. - * @param request ListFrameworkDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFrameworkDeploymentsResponse - */ - public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeploymentsCallback): void; - - /** - * Calls ListFrameworkDeployments. - * @param request ListFrameworkDeploymentsRequest message or plain object - * @returns Promise - */ - public listFrameworkDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): Promise; - - /** - * Calls GetCloudControlDeployment. - * @param request GetCloudControlDeploymentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CloudControlDeployment - */ - public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeploymentCallback): void; - - /** - * Calls GetCloudControlDeployment. - * @param request GetCloudControlDeploymentRequest message or plain object - * @returns Promise - */ - public getCloudControlDeployment(request: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): Promise; - - /** - * Calls ListCloudControlDeployments. - * @param request ListCloudControlDeploymentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListCloudControlDeploymentsResponse - */ - public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, callback: google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeploymentsCallback): void; - - /** - * Calls ListCloudControlDeployments. - * @param request ListCloudControlDeploymentsRequest message or plain object - * @returns Promise - */ - public listCloudControlDeployments(request: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): Promise; - } - - namespace Deployment { - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|createFrameworkDeployment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|deleteFrameworkDeployment}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteFrameworkDeploymentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getFrameworkDeployment}. - * @param error Error, if any - * @param [response] FrameworkDeployment - */ - type GetFrameworkDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listFrameworkDeployments}. - * @param error Error, if any - * @param [response] ListFrameworkDeploymentsResponse - */ - type ListFrameworkDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getCloudControlDeployment}. - * @param error Error, if any - * @param [response] CloudControlDeployment - */ - type GetCloudControlDeploymentCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listCloudControlDeployments}. - * @param error Error, if any - * @param [response] ListCloudControlDeploymentsResponse - */ - type ListCloudControlDeploymentsCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse) => void; - } - - /** DeploymentState enum. */ - enum DeploymentState { - DEPLOYMENT_STATE_UNSPECIFIED = 0, - DEPLOYMENT_STATE_VALIDATING = 1, - DEPLOYMENT_STATE_CREATING = 2, - DEPLOYMENT_STATE_DELETING = 3, - DEPLOYMENT_STATE_UPDATING = 8, - DEPLOYMENT_STATE_FAILED = 4, - DEPLOYMENT_STATE_READY = 5, - DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6, - DEPLOYMENT_STATE_PARTIALLY_DELETED = 7 - } - - /** Properties of a FrameworkDeployment. */ - interface IFrameworkDeployment { - - /** FrameworkDeployment name */ - name?: (string|null); - - /** FrameworkDeployment targetResourceConfig */ - targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** FrameworkDeployment computedTargetResource */ - computedTargetResource?: (string|null); - - /** FrameworkDeployment framework */ - framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); - - /** FrameworkDeployment description */ - description?: (string|null); - - /** FrameworkDeployment cloudControlMetadata */ - cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]|null); - - /** FrameworkDeployment deploymentState */ - deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); - - /** FrameworkDeployment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkDeployment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkDeployment etag */ - etag?: (string|null); - - /** FrameworkDeployment targetResourceDisplayName */ - targetResourceDisplayName?: (string|null); - - /** FrameworkDeployment cloudControlDeploymentReferences */ - cloudControlDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]|null); - } - - /** Represents a FrameworkDeployment. */ - class FrameworkDeployment implements IFrameworkDeployment { - - /** - * Constructs a new FrameworkDeployment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment); - - /** FrameworkDeployment name. */ - public name: string; - - /** FrameworkDeployment targetResourceConfig. */ - public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** FrameworkDeployment computedTargetResource. */ - public computedTargetResource: string; - - /** FrameworkDeployment framework. */ - public framework?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); - - /** FrameworkDeployment description. */ - public description: string; - - /** FrameworkDeployment cloudControlMetadata. */ - public cloudControlMetadata: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata[]; - - /** FrameworkDeployment deploymentState. */ - public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); - - /** FrameworkDeployment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkDeployment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkDeployment etag. */ - public etag: string; - - /** FrameworkDeployment targetResourceDisplayName. */ - public targetResourceDisplayName: string; - - /** FrameworkDeployment cloudControlDeploymentReferences. */ - public cloudControlDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference[]; - - /** - * Creates a new FrameworkDeployment instance using the specified properties. - * @param [properties] Properties to set - * @returns FrameworkDeployment instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; - - /** - * Encodes the specified FrameworkDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. - * @param message FrameworkDeployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FrameworkDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. - * @param message FrameworkDeployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FrameworkDeployment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FrameworkDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; - - /** - * Decodes a FrameworkDeployment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FrameworkDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; - - /** - * Verifies a FrameworkDeployment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FrameworkDeployment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FrameworkDeployment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment; - - /** - * Creates a plain object from a FrameworkDeployment message. Also converts values to other types if specified. - * @param message FrameworkDeployment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FrameworkDeployment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FrameworkDeployment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControlDeployment. */ - interface ICloudControlDeployment { - - /** CloudControlDeployment name */ - name?: (string|null); - - /** CloudControlDeployment targetResourceConfig */ - targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** CloudControlDeployment targetResource */ - targetResource?: (string|null); - - /** CloudControlDeployment cloudControlMetadata */ - cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); - - /** CloudControlDeployment description */ - description?: (string|null); - - /** CloudControlDeployment deploymentState */ - deploymentState?: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState|null); - - /** CloudControlDeployment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** CloudControlDeployment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** CloudControlDeployment etag */ - etag?: (string|null); - - /** CloudControlDeployment parameterSubstitutedCloudControl */ - parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); - - /** CloudControlDeployment frameworkDeploymentReferences */ - frameworkDeploymentReferences?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]|null); - - /** CloudControlDeployment targetResourceDisplayName */ - targetResourceDisplayName?: (string|null); - } - - /** Represents a CloudControlDeployment. */ - class CloudControlDeployment implements ICloudControlDeployment { - - /** - * Constructs a new CloudControlDeployment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment); - - /** CloudControlDeployment name. */ - public name: string; - - /** CloudControlDeployment targetResourceConfig. */ - public targetResourceConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null); - - /** CloudControlDeployment targetResource. */ - public targetResource: string; - - /** CloudControlDeployment cloudControlMetadata. */ - public cloudControlMetadata?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null); - - /** CloudControlDeployment description. */ - public description: string; - - /** CloudControlDeployment deploymentState. */ - public deploymentState: (google.cloud.cloudsecuritycompliance.v1.DeploymentState|keyof typeof google.cloud.cloudsecuritycompliance.v1.DeploymentState); - - /** CloudControlDeployment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** CloudControlDeployment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** CloudControlDeployment etag. */ - public etag: string; - - /** CloudControlDeployment parameterSubstitutedCloudControl. */ - public parameterSubstitutedCloudControl?: (google.cloud.cloudsecuritycompliance.v1.ICloudControl|null); - - /** CloudControlDeployment frameworkDeploymentReferences. */ - public frameworkDeploymentReferences: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference[]; - - /** CloudControlDeployment targetResourceDisplayName. */ - public targetResourceDisplayName: string; - - /** - * Creates a new CloudControlDeployment instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlDeployment instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; - - /** - * Encodes the specified CloudControlDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. - * @param message CloudControlDeployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. - * @param message CloudControlDeployment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlDeployment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; - - /** - * Decodes a CloudControlDeployment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; - - /** - * Verifies a CloudControlDeployment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlDeployment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlDeployment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment; - - /** - * Creates a plain object from a CloudControlDeployment message. Also converts values to other types if specified. - * @param message CloudControlDeployment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlDeployment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlDeployment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TargetResourceConfig. */ - interface ITargetResourceConfig { - - /** TargetResourceConfig existingTargetResource */ - existingTargetResource?: (string|null); - - /** TargetResourceConfig targetResourceCreationConfig */ - targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); - } - - /** Represents a TargetResourceConfig. */ - class TargetResourceConfig implements ITargetResourceConfig { - - /** - * Constructs a new TargetResourceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig); - - /** TargetResourceConfig existingTargetResource. */ - public existingTargetResource?: (string|null); - - /** TargetResourceConfig targetResourceCreationConfig. */ - public targetResourceCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null); - - /** TargetResourceConfig resourceConfig. */ - public resourceConfig?: ("existingTargetResource"|"targetResourceCreationConfig"); - - /** - * Creates a new TargetResourceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TargetResourceConfig instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; - - /** - * Encodes the specified TargetResourceConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. - * @param message TargetResourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TargetResourceConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. - * @param message TargetResourceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TargetResourceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TargetResourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; - - /** - * Decodes a TargetResourceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TargetResourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; - - /** - * Verifies a TargetResourceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TargetResourceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TargetResourceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig; - - /** - * Creates a plain object from a TargetResourceConfig message. Also converts values to other types if specified. - * @param message TargetResourceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TargetResourceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TargetResourceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TargetResourceCreationConfig. */ - interface ITargetResourceCreationConfig { - - /** TargetResourceCreationConfig folderCreationConfig */ - folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); - - /** TargetResourceCreationConfig projectCreationConfig */ - projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); - } - - /** Represents a TargetResourceCreationConfig. */ - class TargetResourceCreationConfig implements ITargetResourceCreationConfig { - - /** - * Constructs a new TargetResourceCreationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig); - - /** TargetResourceCreationConfig folderCreationConfig. */ - public folderCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null); - - /** TargetResourceCreationConfig projectCreationConfig. */ - public projectCreationConfig?: (google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null); - - /** TargetResourceCreationConfig resourceCreationConfig. */ - public resourceCreationConfig?: ("folderCreationConfig"|"projectCreationConfig"); - - /** - * Creates a new TargetResourceCreationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TargetResourceCreationConfig instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; - - /** - * Encodes the specified TargetResourceCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. - * @param message TargetResourceCreationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TargetResourceCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. - * @param message TargetResourceCreationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TargetResourceCreationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TargetResourceCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; - - /** - * Decodes a TargetResourceCreationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TargetResourceCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; - - /** - * Verifies a TargetResourceCreationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TargetResourceCreationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TargetResourceCreationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig; - - /** - * Creates a plain object from a TargetResourceCreationConfig message. Also converts values to other types if specified. - * @param message TargetResourceCreationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TargetResourceCreationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TargetResourceCreationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FolderCreationConfig. */ - interface IFolderCreationConfig { - - /** FolderCreationConfig parent */ - parent?: (string|null); - - /** FolderCreationConfig folderDisplayName */ - folderDisplayName?: (string|null); - } - - /** Represents a FolderCreationConfig. */ - class FolderCreationConfig implements IFolderCreationConfig { - - /** - * Constructs a new FolderCreationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig); - - /** FolderCreationConfig parent. */ - public parent: string; - - /** FolderCreationConfig folderDisplayName. */ - public folderDisplayName: string; - - /** - * Creates a new FolderCreationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns FolderCreationConfig instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; - - /** - * Encodes the specified FolderCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. - * @param message FolderCreationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FolderCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. - * @param message FolderCreationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FolderCreationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FolderCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; - - /** - * Decodes a FolderCreationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FolderCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; - - /** - * Verifies a FolderCreationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FolderCreationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FolderCreationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig; - - /** - * Creates a plain object from a FolderCreationConfig message. Also converts values to other types if specified. - * @param message FolderCreationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FolderCreationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FolderCreationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProjectCreationConfig. */ - interface IProjectCreationConfig { - - /** ProjectCreationConfig parent */ - parent?: (string|null); - - /** ProjectCreationConfig projectDisplayName */ - projectDisplayName?: (string|null); - - /** ProjectCreationConfig billingAccountId */ - billingAccountId?: (string|null); - } - - /** Represents a ProjectCreationConfig. */ - class ProjectCreationConfig implements IProjectCreationConfig { - - /** - * Constructs a new ProjectCreationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig); - - /** ProjectCreationConfig parent. */ - public parent: string; - - /** ProjectCreationConfig projectDisplayName. */ - public projectDisplayName: string; - - /** ProjectCreationConfig billingAccountId. */ - public billingAccountId: string; - - /** - * Creates a new ProjectCreationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ProjectCreationConfig instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; - - /** - * Encodes the specified ProjectCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. - * @param message ProjectCreationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProjectCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. - * @param message ProjectCreationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProjectCreationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProjectCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; - - /** - * Decodes a ProjectCreationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProjectCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; - - /** - * Verifies a ProjectCreationConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProjectCreationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProjectCreationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig; - - /** - * Creates a plain object from a ProjectCreationConfig message. Also converts values to other types if specified. - * @param message ProjectCreationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProjectCreationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProjectCreationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControlMetadata. */ - interface ICloudControlMetadata { - - /** CloudControlMetadata cloudControlDetails */ - cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); - - /** CloudControlMetadata enforcementMode */ - enforcementMode?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null); - } - - /** Represents a CloudControlMetadata. */ - class CloudControlMetadata implements ICloudControlMetadata { - - /** - * Constructs a new CloudControlMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata); - - /** CloudControlMetadata cloudControlDetails. */ - public cloudControlDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null); - - /** CloudControlMetadata enforcementMode. */ - public enforcementMode: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode); - - /** - * Creates a new CloudControlMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlMetadata instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; - - /** - * Encodes the specified CloudControlMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. - * @param message CloudControlMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. - * @param message CloudControlMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; - - /** - * Decodes a CloudControlMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; - - /** - * Verifies a CloudControlMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata; - - /** - * Creates a plain object from a CloudControlMetadata message. Also converts values to other types if specified. - * @param message CloudControlMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateFrameworkDeploymentRequest. */ - interface ICreateFrameworkDeploymentRequest { - - /** CreateFrameworkDeploymentRequest parent */ - parent?: (string|null); - - /** CreateFrameworkDeploymentRequest frameworkDeploymentId */ - frameworkDeploymentId?: (string|null); - - /** CreateFrameworkDeploymentRequest frameworkDeployment */ - frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); - } - - /** Represents a CreateFrameworkDeploymentRequest. */ - class CreateFrameworkDeploymentRequest implements ICreateFrameworkDeploymentRequest { - - /** - * Constructs a new CreateFrameworkDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest); - - /** CreateFrameworkDeploymentRequest parent. */ - public parent: string; - - /** CreateFrameworkDeploymentRequest frameworkDeploymentId. */ - public frameworkDeploymentId: string; - - /** CreateFrameworkDeploymentRequest frameworkDeployment. */ - public frameworkDeployment?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null); - - /** - * Creates a new CreateFrameworkDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateFrameworkDeploymentRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; - - /** - * Encodes the specified CreateFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. - * @param message CreateFrameworkDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. - * @param message CreateFrameworkDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; - - /** - * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; - - /** - * Verifies a CreateFrameworkDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateFrameworkDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest; - - /** - * Creates a plain object from a CreateFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @param message CreateFrameworkDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateFrameworkDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateFrameworkDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteFrameworkDeploymentRequest. */ - interface IDeleteFrameworkDeploymentRequest { - - /** DeleteFrameworkDeploymentRequest name */ - name?: (string|null); - - /** DeleteFrameworkDeploymentRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteFrameworkDeploymentRequest. */ - class DeleteFrameworkDeploymentRequest implements IDeleteFrameworkDeploymentRequest { - - /** - * Constructs a new DeleteFrameworkDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest); - - /** DeleteFrameworkDeploymentRequest name. */ - public name: string; - - /** DeleteFrameworkDeploymentRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteFrameworkDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteFrameworkDeploymentRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; - - /** - * Encodes the specified DeleteFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. - * @param message DeleteFrameworkDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. - * @param message DeleteFrameworkDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; - - /** - * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; - - /** - * Verifies a DeleteFrameworkDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteFrameworkDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest; - - /** - * Creates a plain object from a DeleteFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @param message DeleteFrameworkDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteFrameworkDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteFrameworkDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetFrameworkDeploymentRequest. */ - interface IGetFrameworkDeploymentRequest { - - /** GetFrameworkDeploymentRequest name */ - name?: (string|null); - } - - /** Represents a GetFrameworkDeploymentRequest. */ - class GetFrameworkDeploymentRequest implements IGetFrameworkDeploymentRequest { - - /** - * Constructs a new GetFrameworkDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest); - - /** GetFrameworkDeploymentRequest name. */ - public name: string; - - /** - * Creates a new GetFrameworkDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFrameworkDeploymentRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; - - /** - * Encodes the specified GetFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. - * @param message GetFrameworkDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. - * @param message GetFrameworkDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; - - /** - * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; - - /** - * Verifies a GetFrameworkDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFrameworkDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest; - - /** - * Creates a plain object from a GetFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @param message GetFrameworkDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetFrameworkDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetFrameworkDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFrameworkDeploymentsRequest. */ - interface IListFrameworkDeploymentsRequest { - - /** ListFrameworkDeploymentsRequest parent */ - parent?: (string|null); - - /** ListFrameworkDeploymentsRequest pageSize */ - pageSize?: (number|null); - - /** ListFrameworkDeploymentsRequest pageToken */ - pageToken?: (string|null); - - /** ListFrameworkDeploymentsRequest filter */ - filter?: (string|null); - - /** ListFrameworkDeploymentsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListFrameworkDeploymentsRequest. */ - class ListFrameworkDeploymentsRequest implements IListFrameworkDeploymentsRequest { - - /** - * Constructs a new ListFrameworkDeploymentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest); - - /** ListFrameworkDeploymentsRequest parent. */ - public parent: string; - - /** ListFrameworkDeploymentsRequest pageSize. */ - public pageSize: number; - - /** ListFrameworkDeploymentsRequest pageToken. */ - public pageToken: string; - - /** ListFrameworkDeploymentsRequest filter. */ - public filter: string; - - /** ListFrameworkDeploymentsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListFrameworkDeploymentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworkDeploymentsRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; - - /** - * Encodes the specified ListFrameworkDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. - * @param message ListFrameworkDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworkDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. - * @param message ListFrameworkDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworkDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; - - /** - * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworkDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; - - /** - * Verifies a ListFrameworkDeploymentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworkDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworkDeploymentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest; - - /** - * Creates a plain object from a ListFrameworkDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListFrameworkDeploymentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworkDeploymentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworkDeploymentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFrameworkDeploymentsResponse. */ - interface IListFrameworkDeploymentsResponse { - - /** ListFrameworkDeploymentsResponse frameworkDeployments */ - frameworkDeployments?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]|null); - - /** ListFrameworkDeploymentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFrameworkDeploymentsResponse. */ - class ListFrameworkDeploymentsResponse implements IListFrameworkDeploymentsResponse { - - /** - * Constructs a new ListFrameworkDeploymentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse); - - /** ListFrameworkDeploymentsResponse frameworkDeployments. */ - public frameworkDeployments: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]; - - /** ListFrameworkDeploymentsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListFrameworkDeploymentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworkDeploymentsResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; - - /** - * Encodes the specified ListFrameworkDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. - * @param message ListFrameworkDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworkDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. - * @param message ListFrameworkDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworkDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; - - /** - * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworkDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; - - /** - * Verifies a ListFrameworkDeploymentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworkDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworkDeploymentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse; - - /** - * Creates a plain object from a ListFrameworkDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListFrameworkDeploymentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworkDeploymentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworkDeploymentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetCloudControlDeploymentRequest. */ - interface IGetCloudControlDeploymentRequest { - - /** GetCloudControlDeploymentRequest name */ - name?: (string|null); - } - - /** Represents a GetCloudControlDeploymentRequest. */ - class GetCloudControlDeploymentRequest implements IGetCloudControlDeploymentRequest { - - /** - * Constructs a new GetCloudControlDeploymentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest); - - /** GetCloudControlDeploymentRequest name. */ - public name: string; - - /** - * Creates a new GetCloudControlDeploymentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCloudControlDeploymentRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; - - /** - * Encodes the specified GetCloudControlDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. - * @param message GetCloudControlDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCloudControlDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. - * @param message GetCloudControlDeploymentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCloudControlDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; - - /** - * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCloudControlDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; - - /** - * Verifies a GetCloudControlDeploymentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCloudControlDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCloudControlDeploymentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest; - - /** - * Creates a plain object from a GetCloudControlDeploymentRequest message. Also converts values to other types if specified. - * @param message GetCloudControlDeploymentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCloudControlDeploymentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetCloudControlDeploymentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListCloudControlDeploymentsRequest. */ - interface IListCloudControlDeploymentsRequest { - - /** ListCloudControlDeploymentsRequest parent */ - parent?: (string|null); - - /** ListCloudControlDeploymentsRequest pageSize */ - pageSize?: (number|null); - - /** ListCloudControlDeploymentsRequest pageToken */ - pageToken?: (string|null); - - /** ListCloudControlDeploymentsRequest filter */ - filter?: (string|null); - - /** ListCloudControlDeploymentsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListCloudControlDeploymentsRequest. */ - class ListCloudControlDeploymentsRequest implements IListCloudControlDeploymentsRequest { - - /** - * Constructs a new ListCloudControlDeploymentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest); - - /** ListCloudControlDeploymentsRequest parent. */ - public parent: string; - - /** ListCloudControlDeploymentsRequest pageSize. */ - public pageSize: number; - - /** ListCloudControlDeploymentsRequest pageToken. */ - public pageToken: string; - - /** ListCloudControlDeploymentsRequest filter. */ - public filter: string; - - /** ListCloudControlDeploymentsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListCloudControlDeploymentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListCloudControlDeploymentsRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; - - /** - * Encodes the specified ListCloudControlDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. - * @param message ListCloudControlDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListCloudControlDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. - * @param message ListCloudControlDeploymentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListCloudControlDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; - - /** - * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListCloudControlDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; - - /** - * Verifies a ListCloudControlDeploymentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListCloudControlDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListCloudControlDeploymentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest; - - /** - * Creates a plain object from a ListCloudControlDeploymentsRequest message. Also converts values to other types if specified. - * @param message ListCloudControlDeploymentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListCloudControlDeploymentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListCloudControlDeploymentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListCloudControlDeploymentsResponse. */ - interface IListCloudControlDeploymentsResponse { - - /** ListCloudControlDeploymentsResponse cloudControlDeployments */ - cloudControlDeployments?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]|null); - - /** ListCloudControlDeploymentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListCloudControlDeploymentsResponse. */ - class ListCloudControlDeploymentsResponse implements IListCloudControlDeploymentsResponse { - - /** - * Constructs a new ListCloudControlDeploymentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse); - - /** ListCloudControlDeploymentsResponse cloudControlDeployments. */ - public cloudControlDeployments: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]; - - /** ListCloudControlDeploymentsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListCloudControlDeploymentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListCloudControlDeploymentsResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; - - /** - * Encodes the specified ListCloudControlDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. - * @param message ListCloudControlDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListCloudControlDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. - * @param message ListCloudControlDeploymentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListCloudControlDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; - - /** - * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListCloudControlDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; - - /** - * Verifies a ListCloudControlDeploymentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListCloudControlDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListCloudControlDeploymentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse; - - /** - * Creates a plain object from a ListCloudControlDeploymentsResponse message. Also converts values to other types if specified. - * @param message ListCloudControlDeploymentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListCloudControlDeploymentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListCloudControlDeploymentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControlDeploymentReference. */ - interface ICloudControlDeploymentReference { - - /** CloudControlDeploymentReference cloudControlDeployment */ - cloudControlDeployment?: (string|null); - } - - /** Represents a CloudControlDeploymentReference. */ - class CloudControlDeploymentReference implements ICloudControlDeploymentReference { - - /** - * Constructs a new CloudControlDeploymentReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference); - - /** CloudControlDeploymentReference cloudControlDeployment. */ - public cloudControlDeployment: string; - - /** - * Creates a new CloudControlDeploymentReference instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlDeploymentReference instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; - - /** - * Encodes the specified CloudControlDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. - * @param message CloudControlDeploymentReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. - * @param message CloudControlDeploymentReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlDeploymentReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; - - /** - * Decodes a CloudControlDeploymentReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; - - /** - * Verifies a CloudControlDeploymentReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlDeploymentReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlDeploymentReference - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference; - - /** - * Creates a plain object from a CloudControlDeploymentReference message. Also converts values to other types if specified. - * @param message CloudControlDeploymentReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlDeploymentReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlDeploymentReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FrameworkDeploymentReference. */ - interface IFrameworkDeploymentReference { - - /** FrameworkDeploymentReference frameworkDeployment */ - frameworkDeployment?: (string|null); - - /** FrameworkDeploymentReference frameworkReference */ - frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); - - /** FrameworkDeploymentReference frameworkDisplayName */ - frameworkDisplayName?: (string|null); - } - - /** Represents a FrameworkDeploymentReference. */ - class FrameworkDeploymentReference implements IFrameworkDeploymentReference { - - /** - * Constructs a new FrameworkDeploymentReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference); - - /** FrameworkDeploymentReference frameworkDeployment. */ - public frameworkDeployment: string; - - /** FrameworkDeploymentReference frameworkReference. */ - public frameworkReference?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null); - - /** FrameworkDeploymentReference frameworkDisplayName. */ - public frameworkDisplayName: string; - - /** - * Creates a new FrameworkDeploymentReference instance using the specified properties. - * @param [properties] Properties to set - * @returns FrameworkDeploymentReference instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; - - /** - * Encodes the specified FrameworkDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. - * @param message FrameworkDeploymentReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FrameworkDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. - * @param message FrameworkDeploymentReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FrameworkDeploymentReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FrameworkDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; - - /** - * Decodes a FrameworkDeploymentReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FrameworkDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; - - /** - * Verifies a FrameworkDeploymentReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FrameworkDeploymentReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FrameworkDeploymentReference - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference; - - /** - * Creates a plain object from a FrameworkDeploymentReference message. Also converts values to other types if specified. - * @param message FrameworkDeploymentReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FrameworkDeploymentReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FrameworkDeploymentReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a Monitoring */ - class Monitoring extends $protobuf.rpc.Service { - - /** - * Constructs a new Monitoring 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 Monitoring 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): Monitoring; - - /** - * Calls ListFrameworkComplianceSummaries. - * @param request ListFrameworkComplianceSummariesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFrameworkComplianceSummariesResponse - */ - public listFrameworkComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummariesCallback): void; - - /** - * Calls ListFrameworkComplianceSummaries. - * @param request ListFrameworkComplianceSummariesRequest message or plain object - * @returns Promise - */ - public listFrameworkComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest): Promise; - - /** - * Calls ListFindingSummaries. - * @param request ListFindingSummariesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFindingSummariesResponse - */ - public listFindingSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummariesCallback): void; - - /** - * Calls ListFindingSummaries. - * @param request ListFindingSummariesRequest message or plain object - * @returns Promise - */ - public listFindingSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest): Promise; - - /** - * Calls FetchFrameworkComplianceReport. - * @param request FetchFrameworkComplianceReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FrameworkComplianceReport - */ - public fetchFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReportCallback): void; - - /** - * Calls FetchFrameworkComplianceReport. - * @param request FetchFrameworkComplianceReportRequest message or plain object - * @returns Promise - */ - public fetchFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest): Promise; - - /** - * Calls ListControlComplianceSummaries. - * @param request ListControlComplianceSummariesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListControlComplianceSummariesResponse - */ - public listControlComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummariesCallback): void; - - /** - * Calls ListControlComplianceSummaries. - * @param request ListControlComplianceSummariesRequest message or plain object - * @returns Promise - */ - public listControlComplianceSummaries(request: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest): Promise; - - /** - * Calls AggregateFrameworkComplianceReport. - * @param request AggregateFrameworkComplianceReportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AggregateFrameworkComplianceReportResponse - */ - public aggregateFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, callback: google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReportCallback): void; - - /** - * Calls AggregateFrameworkComplianceReport. - * @param request AggregateFrameworkComplianceReportRequest message or plain object - * @returns Promise - */ - public aggregateFrameworkComplianceReport(request: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest): Promise; - } - - namespace Monitoring { - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFrameworkComplianceSummaries}. - * @param error Error, if any - * @param [response] ListFrameworkComplianceSummariesResponse - */ - type ListFrameworkComplianceSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFindingSummaries}. - * @param error Error, if any - * @param [response] ListFindingSummariesResponse - */ - type ListFindingSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|fetchFrameworkComplianceReport}. - * @param error Error, if any - * @param [response] FrameworkComplianceReport - */ - type FetchFrameworkComplianceReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listControlComplianceSummaries}. - * @param error Error, if any - * @param [response] ListControlComplianceSummariesResponse - */ - type ListControlComplianceSummariesCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse) => void; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|aggregateFrameworkComplianceReport}. - * @param error Error, if any - * @param [response] AggregateFrameworkComplianceReportResponse - */ - type AggregateFrameworkComplianceReportCallback = (error: (Error|null), response?: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse) => void; - } - - /** EvaluationState enum. */ - enum EvaluationState { - EVALUATION_STATE_UNSPECIFIED = 0, - EVALUATION_STATE_PASSED = 1, - EVALUATION_STATE_FAILED = 2, - EVALUATION_STATE_NOT_ASSESSED = 3 - } - - /** FindingClass enum. */ - enum FindingClass { - FINDING_CLASS_UNSPECIFIED = 0, - THREAT = 1, - VULNERABILITY = 2, - MISCONFIGURATION = 3, - OBSERVATION = 4, - SCC_ERROR = 5, - POSTURE_VIOLATION = 6, - TOXIC_COMBINATION = 7, - SENSITIVE_DATA_RISK = 8, - CHOKEPOINT = 9 - } - - /** FrameworkComplianceSummaryView enum. */ - enum FrameworkComplianceSummaryView { - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0, - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1, - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2 - } - - /** Properties of a ListFrameworkComplianceSummariesRequest. */ - interface IListFrameworkComplianceSummariesRequest { - - /** ListFrameworkComplianceSummariesRequest parent */ - parent?: (string|null); - - /** ListFrameworkComplianceSummariesRequest pageSize */ - pageSize?: (number|null); - - /** ListFrameworkComplianceSummariesRequest pageToken */ - pageToken?: (string|null); - - /** ListFrameworkComplianceSummariesRequest filter */ - filter?: (string|null); - - /** ListFrameworkComplianceSummariesRequest view */ - view?: (google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|null); - } - - /** Represents a ListFrameworkComplianceSummariesRequest. */ - class ListFrameworkComplianceSummariesRequest implements IListFrameworkComplianceSummariesRequest { - - /** - * Constructs a new ListFrameworkComplianceSummariesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest); - - /** ListFrameworkComplianceSummariesRequest parent. */ - public parent: string; - - /** ListFrameworkComplianceSummariesRequest pageSize. */ - public pageSize: number; - - /** ListFrameworkComplianceSummariesRequest pageToken. */ - public pageToken: string; - - /** ListFrameworkComplianceSummariesRequest filter. */ - public filter: string; - - /** ListFrameworkComplianceSummariesRequest view. */ - public view: (google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView); - - /** - * Creates a new ListFrameworkComplianceSummariesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworkComplianceSummariesRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; - - /** - * Encodes the specified ListFrameworkComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. - * @param message ListFrameworkComplianceSummariesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworkComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. - * @param message ListFrameworkComplianceSummariesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworkComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; - - /** - * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworkComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; - - /** - * Verifies a ListFrameworkComplianceSummariesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworkComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworkComplianceSummariesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest; - - /** - * Creates a plain object from a ListFrameworkComplianceSummariesRequest message. Also converts values to other types if specified. - * @param message ListFrameworkComplianceSummariesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworkComplianceSummariesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworkComplianceSummariesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFrameworkComplianceSummariesResponse. */ - interface IListFrameworkComplianceSummariesResponse { - - /** ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries */ - frameworkComplianceSummaries?: (google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]|null); - - /** ListFrameworkComplianceSummariesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFrameworkComplianceSummariesResponse. */ - class ListFrameworkComplianceSummariesResponse implements IListFrameworkComplianceSummariesResponse { - - /** - * Constructs a new ListFrameworkComplianceSummariesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse); - - /** ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries. */ - public frameworkComplianceSummaries: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]; - - /** ListFrameworkComplianceSummariesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListFrameworkComplianceSummariesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFrameworkComplianceSummariesResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; - - /** - * Encodes the specified ListFrameworkComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. - * @param message ListFrameworkComplianceSummariesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFrameworkComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. - * @param message ListFrameworkComplianceSummariesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFrameworkComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; - - /** - * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFrameworkComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; - - /** - * Verifies a ListFrameworkComplianceSummariesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFrameworkComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFrameworkComplianceSummariesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse; - - /** - * Creates a plain object from a ListFrameworkComplianceSummariesResponse message. Also converts values to other types if specified. - * @param message ListFrameworkComplianceSummariesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFrameworkComplianceSummariesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFrameworkComplianceSummariesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FrameworkComplianceReport. */ - interface IFrameworkComplianceReport { - - /** FrameworkComplianceReport framework */ - framework?: (string|null); - - /** FrameworkComplianceReport frameworkDescription */ - frameworkDescription?: (string|null); - - /** FrameworkComplianceReport updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkComplianceReport controlAssessmentDetails */ - controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); - - /** FrameworkComplianceReport frameworkType */ - frameworkType?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); - - /** FrameworkComplianceReport supportedCloudProviders */ - supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); - - /** FrameworkComplianceReport frameworkCategories */ - frameworkCategories?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); - - /** FrameworkComplianceReport frameworkDisplayName */ - frameworkDisplayName?: (string|null); - - /** FrameworkComplianceReport name */ - name?: (string|null); - - /** FrameworkComplianceReport majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** FrameworkComplianceReport minorRevisionId */ - minorRevisionId?: (number|Long|string|null); - - /** FrameworkComplianceReport targetResourceDetails */ - targetResourceDetails?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]|null); - } - - /** Represents a FrameworkComplianceReport. */ - class FrameworkComplianceReport implements IFrameworkComplianceReport { - - /** - * Constructs a new FrameworkComplianceReport. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport); - - /** FrameworkComplianceReport framework. */ - public framework: string; - - /** FrameworkComplianceReport frameworkDescription. */ - public frameworkDescription: string; - - /** FrameworkComplianceReport updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** FrameworkComplianceReport controlAssessmentDetails. */ - public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); - - /** FrameworkComplianceReport frameworkType. */ - public frameworkType: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); - - /** FrameworkComplianceReport supportedCloudProviders. */ - public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; - - /** FrameworkComplianceReport frameworkCategories. */ - public frameworkCategories: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; - - /** FrameworkComplianceReport frameworkDisplayName. */ - public frameworkDisplayName: string; - - /** FrameworkComplianceReport name. */ - public name: string; - - /** FrameworkComplianceReport majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** FrameworkComplianceReport minorRevisionId. */ - public minorRevisionId: (number|Long|string); - - /** FrameworkComplianceReport targetResourceDetails. */ - public targetResourceDetails: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]; - - /** - * Creates a new FrameworkComplianceReport instance using the specified properties. - * @param [properties] Properties to set - * @returns FrameworkComplianceReport instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; - - /** - * Encodes the specified FrameworkComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. - * @param message FrameworkComplianceReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FrameworkComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. - * @param message FrameworkComplianceReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FrameworkComplianceReport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FrameworkComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; - - /** - * Decodes a FrameworkComplianceReport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FrameworkComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; - - /** - * Verifies a FrameworkComplianceReport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FrameworkComplianceReport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FrameworkComplianceReport - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport; - - /** - * Creates a plain object from a FrameworkComplianceReport message. Also converts values to other types if specified. - * @param message FrameworkComplianceReport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FrameworkComplianceReport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FrameworkComplianceReport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchFrameworkComplianceReportRequest. */ - interface IFetchFrameworkComplianceReportRequest { - - /** FetchFrameworkComplianceReportRequest name */ - name?: (string|null); - - /** FetchFrameworkComplianceReportRequest endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** FetchFrameworkComplianceReportRequest filter */ - filter?: (string|null); - } - - /** Represents a FetchFrameworkComplianceReportRequest. */ - class FetchFrameworkComplianceReportRequest implements IFetchFrameworkComplianceReportRequest { - - /** - * Constructs a new FetchFrameworkComplianceReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest); - - /** FetchFrameworkComplianceReportRequest name. */ - public name: string; - - /** FetchFrameworkComplianceReportRequest endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** FetchFrameworkComplianceReportRequest filter. */ - public filter: string; - - /** - * Creates a new FetchFrameworkComplianceReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchFrameworkComplianceReportRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; - - /** - * Encodes the specified FetchFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. - * @param message FetchFrameworkComplianceReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. - * @param message FetchFrameworkComplianceReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; - - /** - * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; - - /** - * Verifies a FetchFrameworkComplianceReportRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchFrameworkComplianceReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest; - - /** - * Creates a plain object from a FetchFrameworkComplianceReportRequest message. Also converts values to other types if specified. - * @param message FetchFrameworkComplianceReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchFrameworkComplianceReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchFrameworkComplianceReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFindingSummariesRequest. */ - interface IListFindingSummariesRequest { - - /** ListFindingSummariesRequest parent */ - parent?: (string|null); - - /** ListFindingSummariesRequest pageSize */ - pageSize?: (number|null); - - /** ListFindingSummariesRequest pageToken */ - pageToken?: (string|null); - - /** ListFindingSummariesRequest filter */ - filter?: (string|null); - - /** ListFindingSummariesRequest endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a ListFindingSummariesRequest. */ - class ListFindingSummariesRequest implements IListFindingSummariesRequest { - - /** - * Constructs a new ListFindingSummariesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest); - - /** ListFindingSummariesRequest parent. */ - public parent: string; - - /** ListFindingSummariesRequest pageSize. */ - public pageSize: number; - - /** ListFindingSummariesRequest pageToken. */ - public pageToken: string; - - /** ListFindingSummariesRequest filter. */ - public filter: string; - - /** ListFindingSummariesRequest endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ListFindingSummariesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFindingSummariesRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; - - /** - * Encodes the specified ListFindingSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. - * @param message ListFindingSummariesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFindingSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. - * @param message ListFindingSummariesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFindingSummariesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFindingSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; - - /** - * Decodes a ListFindingSummariesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFindingSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; - - /** - * Verifies a ListFindingSummariesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFindingSummariesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFindingSummariesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest; - - /** - * Creates a plain object from a ListFindingSummariesRequest message. Also converts values to other types if specified. - * @param message ListFindingSummariesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFindingSummariesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFindingSummariesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListFindingSummariesResponse. */ - interface IListFindingSummariesResponse { - - /** ListFindingSummariesResponse findingSummaries */ - findingSummaries?: (google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]|null); - - /** ListFindingSummariesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListFindingSummariesResponse. */ - class ListFindingSummariesResponse implements IListFindingSummariesResponse { - - /** - * Constructs a new ListFindingSummariesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse); - - /** ListFindingSummariesResponse findingSummaries. */ - public findingSummaries: google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]; - - /** ListFindingSummariesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListFindingSummariesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFindingSummariesResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; - - /** - * Encodes the specified ListFindingSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. - * @param message ListFindingSummariesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFindingSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. - * @param message ListFindingSummariesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFindingSummariesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFindingSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; - - /** - * Decodes a ListFindingSummariesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFindingSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; - - /** - * Verifies a ListFindingSummariesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListFindingSummariesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFindingSummariesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse; - - /** - * Creates a plain object from a ListFindingSummariesResponse message. Also converts values to other types if specified. - * @param message ListFindingSummariesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListFindingSummariesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListFindingSummariesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListControlComplianceSummariesRequest. */ - interface IListControlComplianceSummariesRequest { - - /** ListControlComplianceSummariesRequest parent */ - parent?: (string|null); - - /** ListControlComplianceSummariesRequest endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** ListControlComplianceSummariesRequest pageSize */ - pageSize?: (number|null); - - /** ListControlComplianceSummariesRequest pageToken */ - pageToken?: (string|null); - - /** ListControlComplianceSummariesRequest filter */ - filter?: (string|null); - } - - /** Represents a ListControlComplianceSummariesRequest. */ - class ListControlComplianceSummariesRequest implements IListControlComplianceSummariesRequest { - - /** - * Constructs a new ListControlComplianceSummariesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest); - - /** ListControlComplianceSummariesRequest parent. */ - public parent: string; - - /** ListControlComplianceSummariesRequest endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** ListControlComplianceSummariesRequest pageSize. */ - public pageSize: number; - - /** ListControlComplianceSummariesRequest pageToken. */ - public pageToken: string; - - /** ListControlComplianceSummariesRequest filter. */ - public filter: string; - - /** - * Creates a new ListControlComplianceSummariesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListControlComplianceSummariesRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; - - /** - * Encodes the specified ListControlComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. - * @param message ListControlComplianceSummariesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListControlComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. - * @param message ListControlComplianceSummariesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListControlComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; - - /** - * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListControlComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; - - /** - * Verifies a ListControlComplianceSummariesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListControlComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListControlComplianceSummariesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest; - - /** - * Creates a plain object from a ListControlComplianceSummariesRequest message. Also converts values to other types if specified. - * @param message ListControlComplianceSummariesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListControlComplianceSummariesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListControlComplianceSummariesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListControlComplianceSummariesResponse. */ - interface IListControlComplianceSummariesResponse { - - /** ListControlComplianceSummariesResponse controlComplianceSummaries */ - controlComplianceSummaries?: (google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]|null); - - /** ListControlComplianceSummariesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListControlComplianceSummariesResponse. */ - class ListControlComplianceSummariesResponse implements IListControlComplianceSummariesResponse { - - /** - * Constructs a new ListControlComplianceSummariesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse); - - /** ListControlComplianceSummariesResponse controlComplianceSummaries. */ - public controlComplianceSummaries: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]; - - /** ListControlComplianceSummariesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListControlComplianceSummariesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListControlComplianceSummariesResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; - - /** - * Encodes the specified ListControlComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. - * @param message ListControlComplianceSummariesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListControlComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. - * @param message ListControlComplianceSummariesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListControlComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; - - /** - * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListControlComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; - - /** - * Verifies a ListControlComplianceSummariesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListControlComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListControlComplianceSummariesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse; - - /** - * Creates a plain object from a ListControlComplianceSummariesResponse message. Also converts values to other types if specified. - * @param message ListControlComplianceSummariesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListControlComplianceSummariesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListControlComplianceSummariesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AggregateFrameworkComplianceReportRequest. */ - interface IAggregateFrameworkComplianceReportRequest { - - /** AggregateFrameworkComplianceReportRequest name */ - name?: (string|null); - - /** AggregateFrameworkComplianceReportRequest interval */ - interval?: (google.type.IInterval|null); - - /** AggregateFrameworkComplianceReportRequest filter */ - filter?: (string|null); - } - - /** Represents an AggregateFrameworkComplianceReportRequest. */ - class AggregateFrameworkComplianceReportRequest implements IAggregateFrameworkComplianceReportRequest { - - /** - * Constructs a new AggregateFrameworkComplianceReportRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest); - - /** AggregateFrameworkComplianceReportRequest name. */ - public name: string; - - /** AggregateFrameworkComplianceReportRequest interval. */ - public interval?: (google.type.IInterval|null); - - /** AggregateFrameworkComplianceReportRequest filter. */ - public filter: string; - - /** - * Creates a new AggregateFrameworkComplianceReportRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AggregateFrameworkComplianceReportRequest instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; - - /** - * Encodes the specified AggregateFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. - * @param message AggregateFrameworkComplianceReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AggregateFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. - * @param message AggregateFrameworkComplianceReportRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AggregateFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; - - /** - * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AggregateFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; - - /** - * Verifies an AggregateFrameworkComplianceReportRequest message. - * @param message Plain 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 AggregateFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AggregateFrameworkComplianceReportRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest; - - /** - * Creates a plain object from an AggregateFrameworkComplianceReportRequest message. Also converts values to other types if specified. - * @param message AggregateFrameworkComplianceReportRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AggregateFrameworkComplianceReportRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AggregateFrameworkComplianceReportRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AggregateFrameworkComplianceReportResponse. */ - interface IAggregateFrameworkComplianceReportResponse { - - /** AggregateFrameworkComplianceReportResponse aggregatedComplianceReports */ - aggregatedComplianceReports?: (google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport[]|null); - } - - /** Represents an AggregateFrameworkComplianceReportResponse. */ - class AggregateFrameworkComplianceReportResponse implements IAggregateFrameworkComplianceReportResponse { - - /** - * Constructs a new AggregateFrameworkComplianceReportResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse); - - /** AggregateFrameworkComplianceReportResponse aggregatedComplianceReports. */ - public aggregatedComplianceReports: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport[]; - - /** - * Creates a new AggregateFrameworkComplianceReportResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AggregateFrameworkComplianceReportResponse instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; - - /** - * Encodes the specified AggregateFrameworkComplianceReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. - * @param message AggregateFrameworkComplianceReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AggregateFrameworkComplianceReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. - * @param message AggregateFrameworkComplianceReportResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AggregateFrameworkComplianceReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; - - /** - * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AggregateFrameworkComplianceReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; - - /** - * Verifies an AggregateFrameworkComplianceReportResponse message. - * @param message Plain 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 AggregateFrameworkComplianceReportResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AggregateFrameworkComplianceReportResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse; - - /** - * Creates a plain object from an AggregateFrameworkComplianceReportResponse message. Also converts values to other types if specified. - * @param message AggregateFrameworkComplianceReportResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AggregateFrameworkComplianceReportResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AggregateFrameworkComplianceReportResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ControlAssessmentDetails. */ - interface IControlAssessmentDetails { - - /** ControlAssessmentDetails passingControls */ - passingControls?: (number|null); - - /** ControlAssessmentDetails failingControls */ - failingControls?: (number|null); - - /** ControlAssessmentDetails assessedPassingControls */ - assessedPassingControls?: (number|null); - - /** ControlAssessmentDetails notAssessedControls */ - notAssessedControls?: (number|null); - } - - /** Represents a ControlAssessmentDetails. */ - class ControlAssessmentDetails implements IControlAssessmentDetails { - - /** - * Constructs a new ControlAssessmentDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails); - - /** ControlAssessmentDetails passingControls. */ - public passingControls: number; - - /** ControlAssessmentDetails failingControls. */ - public failingControls: number; - - /** ControlAssessmentDetails assessedPassingControls. */ - public assessedPassingControls: number; - - /** ControlAssessmentDetails notAssessedControls. */ - public notAssessedControls: number; - - /** - * Creates a new ControlAssessmentDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ControlAssessmentDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; - - /** - * Encodes the specified ControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. - * @param message ControlAssessmentDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. - * @param message ControlAssessmentDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ControlAssessmentDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; - - /** - * Decodes a ControlAssessmentDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; - - /** - * Verifies a ControlAssessmentDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ControlAssessmentDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails; - - /** - * Creates a plain object from a ControlAssessmentDetails message. Also converts values to other types if specified. - * @param message ControlAssessmentDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ControlAssessmentDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ControlAssessmentDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FrameworkComplianceSummary. */ - interface IFrameworkComplianceSummary { - - /** FrameworkComplianceSummary framework */ - framework?: (string|null); - - /** FrameworkComplianceSummary controlAssessmentDetails */ - controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); - - /** FrameworkComplianceSummary frameworkType */ - frameworkType?: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null); - - /** FrameworkComplianceSummary supportedCloudProviders */ - supportedCloudProviders?: (google.cloud.cloudsecuritycompliance.v1.CloudProvider[]|null); - - /** FrameworkComplianceSummary frameworkCategories */ - frameworkCategories?: (google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]|null); - - /** FrameworkComplianceSummary frameworkDisplayName */ - frameworkDisplayName?: (string|null); - - /** FrameworkComplianceSummary name */ - name?: (string|null); - - /** FrameworkComplianceSummary majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** FrameworkComplianceSummary minorRevisionId */ - minorRevisionId?: (number|Long|string|null); - - /** FrameworkComplianceSummary targetResourceDetails */ - targetResourceDetails?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]|null); - - /** FrameworkComplianceSummary findingCount */ - findingCount?: (number|Long|string|null); - - /** FrameworkComplianceSummary controlsPassingTrend */ - controlsPassingTrend?: (google.cloud.cloudsecuritycompliance.v1.ITrend|null); - } - - /** Represents a FrameworkComplianceSummary. */ - class FrameworkComplianceSummary implements IFrameworkComplianceSummary { - - /** - * Constructs a new FrameworkComplianceSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary); - - /** FrameworkComplianceSummary framework. */ - public framework: string; - - /** FrameworkComplianceSummary controlAssessmentDetails. */ - public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); - - /** FrameworkComplianceSummary frameworkType. */ - public frameworkType: (google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|keyof typeof google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType); - - /** FrameworkComplianceSummary supportedCloudProviders. */ - public supportedCloudProviders: google.cloud.cloudsecuritycompliance.v1.CloudProvider[]; - - /** FrameworkComplianceSummary frameworkCategories. */ - public frameworkCategories: google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[]; - - /** FrameworkComplianceSummary frameworkDisplayName. */ - public frameworkDisplayName: string; - - /** FrameworkComplianceSummary name. */ - public name: string; - - /** FrameworkComplianceSummary majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** FrameworkComplianceSummary minorRevisionId. */ - public minorRevisionId: (number|Long|string); - - /** FrameworkComplianceSummary targetResourceDetails. */ - public targetResourceDetails: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]; - - /** FrameworkComplianceSummary findingCount. */ - public findingCount: (number|Long|string); - - /** FrameworkComplianceSummary controlsPassingTrend. */ - public controlsPassingTrend?: (google.cloud.cloudsecuritycompliance.v1.ITrend|null); - - /** - * Creates a new FrameworkComplianceSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns FrameworkComplianceSummary instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; - - /** - * Encodes the specified FrameworkComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. - * @param message FrameworkComplianceSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FrameworkComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. - * @param message FrameworkComplianceSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FrameworkComplianceSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FrameworkComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; - - /** - * Decodes a FrameworkComplianceSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FrameworkComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; - - /** - * Verifies a FrameworkComplianceSummary message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FrameworkComplianceSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FrameworkComplianceSummary - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary; - - /** - * Creates a plain object from a FrameworkComplianceSummary message. Also converts values to other types if specified. - * @param message FrameworkComplianceSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FrameworkComplianceSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FrameworkComplianceSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FindingSummary. */ - interface IFindingSummary { - - /** FindingSummary findingCategory */ - findingCategory?: (string|null); - - /** FindingSummary findingClass */ - findingClass?: (google.cloud.cloudsecuritycompliance.v1.FindingClass|keyof typeof google.cloud.cloudsecuritycompliance.v1.FindingClass|null); - - /** FindingSummary severity */ - severity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); - - /** FindingSummary findingCount */ - findingCount?: (number|Long|string|null); - - /** FindingSummary updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** FindingSummary relatedFrameworks */ - relatedFrameworks?: (string[]|null); - - /** FindingSummary name */ - name?: (string|null); - } - - /** Represents a FindingSummary. */ - class FindingSummary implements IFindingSummary { - - /** - * Constructs a new FindingSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingSummary); - - /** FindingSummary findingCategory. */ - public findingCategory: string; - - /** FindingSummary findingClass. */ - public findingClass: (google.cloud.cloudsecuritycompliance.v1.FindingClass|keyof typeof google.cloud.cloudsecuritycompliance.v1.FindingClass); - - /** FindingSummary severity. */ - public severity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); - - /** FindingSummary findingCount. */ - public findingCount: (number|Long|string); - - /** FindingSummary updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** FindingSummary relatedFrameworks. */ - public relatedFrameworks: string[]; - - /** FindingSummary name. */ - public name: string; - - /** - * Creates a new FindingSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns FindingSummary instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IFindingSummary): google.cloud.cloudsecuritycompliance.v1.FindingSummary; - - /** - * Encodes the specified FindingSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. - * @param message FindingSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IFindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FindingSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. - * @param message FindingSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IFindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FindingSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FindingSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.FindingSummary; - - /** - * Decodes a FindingSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FindingSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.FindingSummary; - - /** - * Verifies a FindingSummary message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FindingSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FindingSummary - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.FindingSummary; - - /** - * Creates a plain object from a FindingSummary message. Also converts values to other types if specified. - * @param message FindingSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.FindingSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FindingSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FindingSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ControlComplianceSummary. */ - interface IControlComplianceSummary { - - /** ControlComplianceSummary control */ - control?: (string|null); - - /** ControlComplianceSummary displayName */ - displayName?: (string|null); - - /** ControlComplianceSummary description */ - description?: (string|null); - - /** ControlComplianceSummary overallEvaluationState */ - overallEvaluationState?: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState|null); - - /** ControlComplianceSummary totalFindingsCount */ - totalFindingsCount?: (number|null); - - /** ControlComplianceSummary complianceFrameworks */ - complianceFrameworks?: (string[]|null); - - /** ControlComplianceSummary similarControls */ - similarControls?: (google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]|null); - - /** ControlComplianceSummary cloudControlReports */ - cloudControlReports?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlReport[]|null); - - /** ControlComplianceSummary controlResponsibilityType */ - controlResponsibilityType?: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null); - - /** ControlComplianceSummary isFakeControl */ - isFakeControl?: (boolean|null); - - /** ControlComplianceSummary name */ - name?: (string|null); - } - - /** Represents a ControlComplianceSummary. */ - class ControlComplianceSummary implements IControlComplianceSummary { - - /** - * Constructs a new ControlComplianceSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary); - - /** ControlComplianceSummary control. */ - public control: string; - - /** ControlComplianceSummary displayName. */ - public displayName: string; - - /** ControlComplianceSummary description. */ - public description: string; - - /** ControlComplianceSummary overallEvaluationState. */ - public overallEvaluationState: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState); - - /** ControlComplianceSummary totalFindingsCount. */ - public totalFindingsCount: number; - - /** ControlComplianceSummary complianceFrameworks. */ - public complianceFrameworks: string[]; - - /** ControlComplianceSummary similarControls. */ - public similarControls: google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]; - - /** ControlComplianceSummary cloudControlReports. */ - public cloudControlReports: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport[]; - - /** ControlComplianceSummary controlResponsibilityType. */ - public controlResponsibilityType: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType); - - /** ControlComplianceSummary isFakeControl. */ - public isFakeControl: boolean; - - /** ControlComplianceSummary name. */ - public name: string; - - /** - * Creates a new ControlComplianceSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns ControlComplianceSummary instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; - - /** - * Encodes the specified ControlComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. - * @param message ControlComplianceSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ControlComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. - * @param message ControlComplianceSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ControlComplianceSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ControlComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; - - /** - * Decodes a ControlComplianceSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ControlComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; - - /** - * Verifies a ControlComplianceSummary message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ControlComplianceSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ControlComplianceSummary - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary; - - /** - * Creates a plain object from a ControlComplianceSummary message. Also converts values to other types if specified. - * @param message ControlComplianceSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ControlComplianceSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ControlComplianceSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControlReport. */ - interface ICloudControlReport { - - /** CloudControlReport manualCloudControlAssessmentDetails */ - manualCloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null); - - /** CloudControlReport cloudControlAssessmentDetails */ - cloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null); - - /** CloudControlReport cloudControl */ - cloudControl?: (string|null); - - /** CloudControlReport displayName */ - displayName?: (string|null); - - /** CloudControlReport description */ - description?: (string|null); - - /** CloudControlReport categories */ - categories?: (string[]|null); - - /** CloudControlReport similarControls */ - similarControls?: (google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]|null); - - /** CloudControlReport cloudControlType */ - cloudControlType?: (google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|keyof typeof google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|null); - - /** CloudControlReport findingCategory */ - findingCategory?: (string|null); - - /** CloudControlReport rules */ - rules?: (google.cloud.cloudsecuritycompliance.v1.IRule[]|null); - - /** CloudControlReport findingSeverity */ - findingSeverity?: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity|null); - - /** CloudControlReport enforcementMode */ - enforcementMode?: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null); - - /** CloudControlReport cloudControlDeployment */ - cloudControlDeployment?: (string|null); - - /** CloudControlReport majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** CloudControlReport minorRevisionId */ - minorRevisionId?: (number|Long|string|null); - - /** CloudControlReport frameworkMajorRevisionIds */ - frameworkMajorRevisionIds?: ((number|Long|string)[]|null); - } - - /** Represents a CloudControlReport. */ - class CloudControlReport implements ICloudControlReport { - - /** - * Constructs a new CloudControlReport. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport); - - /** CloudControlReport manualCloudControlAssessmentDetails. */ - public manualCloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null); - - /** CloudControlReport cloudControlAssessmentDetails. */ - public cloudControlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null); - - /** CloudControlReport cloudControl. */ - public cloudControl: string; - - /** CloudControlReport displayName. */ - public displayName: string; - - /** CloudControlReport description. */ - public description: string; - - /** CloudControlReport categories. */ - public categories: string[]; - - /** CloudControlReport similarControls. */ - public similarControls: google.cloud.cloudsecuritycompliance.v1.ISimilarControls[]; - - /** CloudControlReport cloudControlType. */ - public cloudControlType: (google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|keyof typeof google.cloud.cloudsecuritycompliance.v1.CloudControl.Type); - - /** CloudControlReport findingCategory. */ - public findingCategory: string; - - /** CloudControlReport rules. */ - public rules: google.cloud.cloudsecuritycompliance.v1.IRule[]; - - /** CloudControlReport findingSeverity. */ - public findingSeverity: (google.cloud.cloudsecuritycompliance.v1.Severity|keyof typeof google.cloud.cloudsecuritycompliance.v1.Severity); - - /** CloudControlReport enforcementMode. */ - public enforcementMode: (google.cloud.cloudsecuritycompliance.v1.EnforcementMode|keyof typeof google.cloud.cloudsecuritycompliance.v1.EnforcementMode); - - /** CloudControlReport cloudControlDeployment. */ - public cloudControlDeployment: string; - - /** CloudControlReport majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** CloudControlReport minorRevisionId. */ - public minorRevisionId: (number|Long|string); - - /** CloudControlReport frameworkMajorRevisionIds. */ - public frameworkMajorRevisionIds: (number|Long|string)[]; - - /** CloudControlReport assessmentDetails. */ - public assessmentDetails?: ("manualCloudControlAssessmentDetails"|"cloudControlAssessmentDetails"); - - /** - * Creates a new CloudControlReport instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlReport instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; - - /** - * Encodes the specified CloudControlReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. - * @param message CloudControlReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. - * @param message CloudControlReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlReport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; - - /** - * Decodes a CloudControlReport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; - - /** - * Verifies a CloudControlReport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlReport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlReport - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlReport; - - /** - * Creates a plain object from a CloudControlReport message. Also converts values to other types if specified. - * @param message CloudControlReport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlReport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlReport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ManualCloudControlAssessmentDetails. */ - interface IManualCloudControlAssessmentDetails { - - /** ManualCloudControlAssessmentDetails manualCloudControlGuide */ - manualCloudControlGuide?: (string[]|null); - } - - /** Represents a ManualCloudControlAssessmentDetails. */ - class ManualCloudControlAssessmentDetails implements IManualCloudControlAssessmentDetails { - - /** - * Constructs a new ManualCloudControlAssessmentDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails); - - /** ManualCloudControlAssessmentDetails manualCloudControlGuide. */ - public manualCloudControlGuide: string[]; - - /** - * Creates a new ManualCloudControlAssessmentDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ManualCloudControlAssessmentDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; - - /** - * Encodes the specified ManualCloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. - * @param message ManualCloudControlAssessmentDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManualCloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. - * @param message ManualCloudControlAssessmentDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManualCloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; - - /** - * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManualCloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; - - /** - * Verifies a ManualCloudControlAssessmentDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ManualCloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManualCloudControlAssessmentDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails; - - /** - * Creates a plain object from a ManualCloudControlAssessmentDetails message. Also converts values to other types if specified. - * @param message ManualCloudControlAssessmentDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ManualCloudControlAssessmentDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ManualCloudControlAssessmentDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudControlAssessmentDetails. */ - interface ICloudControlAssessmentDetails { - - /** CloudControlAssessmentDetails findingsCount */ - findingsCount?: (number|null); - - /** CloudControlAssessmentDetails evaluationState */ - evaluationState?: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState|null); - } - - /** Represents a CloudControlAssessmentDetails. */ - class CloudControlAssessmentDetails implements ICloudControlAssessmentDetails { - - /** - * Constructs a new CloudControlAssessmentDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails); - - /** CloudControlAssessmentDetails findingsCount. */ - public findingsCount: number; - - /** CloudControlAssessmentDetails evaluationState. */ - public evaluationState: (google.cloud.cloudsecuritycompliance.v1.EvaluationState|keyof typeof google.cloud.cloudsecuritycompliance.v1.EvaluationState); - - /** - * Creates a new CloudControlAssessmentDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudControlAssessmentDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; - - /** - * Encodes the specified CloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. - * @param message CloudControlAssessmentDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. - * @param message CloudControlAssessmentDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; - - /** - * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; - - /** - * Verifies a CloudControlAssessmentDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudControlAssessmentDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails; - - /** - * Creates a plain object from a CloudControlAssessmentDetails message. Also converts values to other types if specified. - * @param message CloudControlAssessmentDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudControlAssessmentDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudControlAssessmentDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SimilarControls. */ - interface ISimilarControls { - - /** SimilarControls framework */ - framework?: (string|null); - - /** SimilarControls controlId */ - controlId?: (string|null); - } - - /** Represents a SimilarControls. */ - class SimilarControls implements ISimilarControls { - - /** - * Constructs a new SimilarControls. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ISimilarControls); - - /** SimilarControls framework. */ - public framework: string; - - /** SimilarControls controlId. */ - public controlId: string; - - /** - * Creates a new SimilarControls instance using the specified properties. - * @param [properties] Properties to set - * @returns SimilarControls instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ISimilarControls): google.cloud.cloudsecuritycompliance.v1.SimilarControls; - - /** - * Encodes the specified SimilarControls message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. - * @param message SimilarControls message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ISimilarControls, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimilarControls message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. - * @param message SimilarControls message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ISimilarControls, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimilarControls message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimilarControls - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.SimilarControls; - - /** - * Decodes a SimilarControls message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimilarControls - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.SimilarControls; - - /** - * Verifies a SimilarControls message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimilarControls message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimilarControls - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.SimilarControls; - - /** - * Creates a plain object from a SimilarControls message. Also converts values to other types if specified. - * @param message SimilarControls - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.SimilarControls, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimilarControls to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimilarControls - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AggregatedComplianceReport. */ - interface IAggregatedComplianceReport { - - /** AggregatedComplianceReport controlAssessmentDetails */ - controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); - - /** AggregatedComplianceReport reportTime */ - reportTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an AggregatedComplianceReport. */ - class AggregatedComplianceReport implements IAggregatedComplianceReport { - - /** - * Constructs a new AggregatedComplianceReport. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport); - - /** AggregatedComplianceReport controlAssessmentDetails. */ - public controlAssessmentDetails?: (google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null); - - /** AggregatedComplianceReport reportTime. */ - public reportTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new AggregatedComplianceReport instance using the specified properties. - * @param [properties] Properties to set - * @returns AggregatedComplianceReport instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; - - /** - * Encodes the specified AggregatedComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. - * @param message AggregatedComplianceReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AggregatedComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. - * @param message AggregatedComplianceReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AggregatedComplianceReport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AggregatedComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; - - /** - * Decodes an AggregatedComplianceReport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AggregatedComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; - - /** - * Verifies an AggregatedComplianceReport message. - * @param message Plain 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 AggregatedComplianceReport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AggregatedComplianceReport - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport; - - /** - * Creates a plain object from an AggregatedComplianceReport message. Also converts values to other types if specified. - * @param message AggregatedComplianceReport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AggregatedComplianceReport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AggregatedComplianceReport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TargetResourceDetails. */ - interface ITargetResourceDetails { - - /** TargetResourceDetails frameworkDeployment */ - frameworkDeployment?: (string|null); - - /** TargetResourceDetails targetResourceDisplayName */ - targetResourceDisplayName?: (string|null); - - /** TargetResourceDetails targetResource */ - targetResource?: (string|null); - - /** TargetResourceDetails createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** TargetResourceDetails updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** TargetResourceDetails majorRevisionId */ - majorRevisionId?: (number|Long|string|null); - - /** TargetResourceDetails minorRevisionId */ - minorRevisionId?: (number|Long|string|null); - } - - /** Represents a TargetResourceDetails. */ - class TargetResourceDetails implements ITargetResourceDetails { - - /** - * Constructs a new TargetResourceDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails); - - /** TargetResourceDetails frameworkDeployment. */ - public frameworkDeployment: string; - - /** TargetResourceDetails targetResourceDisplayName. */ - public targetResourceDisplayName: string; - - /** TargetResourceDetails targetResource. */ - public targetResource: string; - - /** TargetResourceDetails createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** TargetResourceDetails updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** TargetResourceDetails majorRevisionId. */ - public majorRevisionId: (number|Long|string); - - /** TargetResourceDetails minorRevisionId. */ - public minorRevisionId: (number|Long|string); - - /** - * Creates a new TargetResourceDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns TargetResourceDetails instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; - - /** - * Encodes the specified TargetResourceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. - * @param message TargetResourceDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TargetResourceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. - * @param message TargetResourceDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TargetResourceDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TargetResourceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; - - /** - * Decodes a TargetResourceDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TargetResourceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; - - /** - * Verifies a TargetResourceDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TargetResourceDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TargetResourceDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails; - - /** - * Creates a plain object from a TargetResourceDetails message. Also converts values to other types if specified. - * @param message TargetResourceDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TargetResourceDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TargetResourceDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Trend. */ - interface ITrend { - - /** Trend duration */ - duration?: (google.protobuf.IDuration|null); - - /** Trend valuePercent */ - valuePercent?: (number|null); - } - - /** Represents a Trend. */ - class Trend implements ITrend { - - /** - * Constructs a new Trend. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITrend); - - /** Trend duration. */ - public duration?: (google.protobuf.IDuration|null); - - /** Trend valuePercent. */ - public valuePercent: number; - - /** - * Creates a new Trend instance using the specified properties. - * @param [properties] Properties to set - * @returns Trend instance - */ - public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITrend): google.cloud.cloudsecuritycompliance.v1.Trend; - - /** - * Encodes the specified Trend message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. - * @param message Trend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITrend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trend message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. - * @param message Trend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITrend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Trend; - - /** - * Decodes a Trend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Trend; - - /** - * Verifies a Trend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Trend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trend - */ - public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Trend; - - /** - * Creates a plain object from a Trend message. Also converts values to other types if specified. - * @param message Trend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Trend, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Trend - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not 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.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload 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.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not 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.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload 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.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not 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.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload 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.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not 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.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload 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.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not 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.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload 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.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not 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.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload 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.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not 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.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload 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.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not 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.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload 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.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not 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.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload 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.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not 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.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload 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.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not 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.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload 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.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not 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.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload 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.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not 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.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload 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.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** 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, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not 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.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload 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.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions 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 features */ - features?: (google.protobuf.IFeatureSet|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 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 features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|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 deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not 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.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload 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.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain 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 EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** 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 features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|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 deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (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 features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** 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); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|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 features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|Buffer|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|Buffer|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not 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.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload 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.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not 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.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload 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.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not 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.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload 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.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|Buffer|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|Buffer|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 }; - - /** - * 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. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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. */ - 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 }; - - /** - * 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; - } - } - - /** 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 }; - - /** - * 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; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of an Interval. */ - interface IInterval { - - /** Interval startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Interval endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an Interval. */ - class Interval implements IInterval { - - /** - * Constructs a new Interval. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IInterval); - - /** Interval startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Interval endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Interval instance using the specified properties. - * @param [properties] Properties to set - * @returns Interval instance - */ - public static create(properties?: google.type.IInterval): google.type.Interval; - - /** - * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. - * @param message Interval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. - * @param message Interval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Interval message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Interval - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Interval; - - /** - * Decodes an Interval message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Interval - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Interval; - - /** - * Verifies an Interval message. - * @param message Plain 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 Interval message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Interval - */ - public static fromObject(object: { [k: string]: any }): google.type.Interval; - - /** - * Creates a plain object from an Interval message. Also converts values to other types if specified. - * @param message Interval - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Interval to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Interval - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js deleted file mode 100644 index e0d9a03dc52..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.js +++ /dev/null @@ -1,51390 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_cloudsecuritycompliance_protos || ($protobuf.roots._google_cloud_cloudsecuritycompliance_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.cloudsecuritycompliance = (function() { - - /** - * Namespace cloudsecuritycompliance. - * @memberof google.cloud - * @namespace - */ - var cloudsecuritycompliance = {}; - - cloudsecuritycompliance.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.cloudsecuritycompliance - * @namespace - */ - var v1 = {}; - - v1.Audit = (function() { - - /** - * Constructs a new Audit service. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an Audit - * @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 Audit(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Audit.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Audit; - - /** - * Creates new Audit service using the specified rpc implementation. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @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 {Audit} RPC service. Useful where requests and/or responses are streamed. - */ - Audit.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|generateFrameworkAuditScopeReport}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @typedef GenerateFrameworkAuditScopeReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} [response] GenerateFrameworkAuditScopeReportResponse - */ - - /** - * Calls GenerateFrameworkAuditScopeReport. - * @function generateFrameworkAuditScopeReport - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} request GenerateFrameworkAuditScopeReportRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReportCallback} callback Node-style callback called with the error, if any, and GenerateFrameworkAuditScopeReportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Audit.prototype.generateFrameworkAuditScopeReport = function generateFrameworkAuditScopeReport(request, callback) { - return this.rpcCall(generateFrameworkAuditScopeReport, $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest, $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse, request, callback); - }, "name", { value: "GenerateFrameworkAuditScopeReport" }); - - /** - * Calls GenerateFrameworkAuditScopeReport. - * @function generateFrameworkAuditScopeReport - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} request GenerateFrameworkAuditScopeReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|createFrameworkAudit}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @typedef CreateFrameworkAuditCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateFrameworkAudit. - * @function createFrameworkAudit - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} request CreateFrameworkAuditRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAuditCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Audit.prototype.createFrameworkAudit = function createFrameworkAudit(request, callback) { - return this.rpcCall(createFrameworkAudit, $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateFrameworkAudit" }); - - /** - * Calls CreateFrameworkAudit. - * @function createFrameworkAudit - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} request CreateFrameworkAuditRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|listFrameworkAudits}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @typedef ListFrameworkAuditsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} [response] ListFrameworkAuditsResponse - */ - - /** - * Calls ListFrameworkAudits. - * @function listFrameworkAudits - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} request ListFrameworkAuditsRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAuditsCallback} callback Node-style callback called with the error, if any, and ListFrameworkAuditsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Audit.prototype.listFrameworkAudits = function listFrameworkAudits(request, callback) { - return this.rpcCall(listFrameworkAudits, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse, request, callback); - }, "name", { value: "ListFrameworkAudits" }); - - /** - * Calls ListFrameworkAudits. - * @function listFrameworkAudits - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} request ListFrameworkAuditsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Audit|getFrameworkAudit}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @typedef GetFrameworkAuditCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} [response] FrameworkAudit - */ - - /** - * Calls GetFrameworkAudit. - * @function getFrameworkAudit - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} request GetFrameworkAuditRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAuditCallback} callback Node-style callback called with the error, if any, and FrameworkAudit - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Audit.prototype.getFrameworkAudit = function getFrameworkAudit(request, callback) { - return this.rpcCall(getFrameworkAudit, $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest, $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit, request, callback); - }, "name", { value: "GetFrameworkAudit" }); - - /** - * Calls GetFrameworkAudit. - * @function getFrameworkAudit - * @memberof google.cloud.cloudsecuritycompliance.v1.Audit - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} request GetFrameworkAuditRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Audit; - })(); - - /** - * ComplianceState enum. - * @name google.cloud.cloudsecuritycompliance.v1.ComplianceState - * @enum {number} - * @property {number} COMPLIANCE_STATE_UNSPECIFIED=0 COMPLIANCE_STATE_UNSPECIFIED value - * @property {number} COMPLIANT=1 COMPLIANT value - * @property {number} VIOLATION=2 VIOLATION value - * @property {number} MANUAL_REVIEW_NEEDED=3 MANUAL_REVIEW_NEEDED value - * @property {number} ERROR=4 ERROR value - * @property {number} AUDIT_NOT_SUPPORTED=5 AUDIT_NOT_SUPPORTED value - */ - v1.ComplianceState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPLIANCE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPLIANT"] = 1; - values[valuesById[2] = "VIOLATION"] = 2; - values[valuesById[3] = "MANUAL_REVIEW_NEEDED"] = 3; - values[valuesById[4] = "ERROR"] = 4; - values[valuesById[5] = "AUDIT_NOT_SUPPORTED"] = 5; - return values; - })(); - - v1.GenerateFrameworkAuditScopeReportRequest = (function() { - - /** - * Properties of a GenerateFrameworkAuditScopeReportRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IGenerateFrameworkAuditScopeReportRequest - * @property {string|null} [scope] GenerateFrameworkAuditScopeReportRequest scope - * @property {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format|null} [reportFormat] GenerateFrameworkAuditScopeReportRequest reportFormat - * @property {string|null} [complianceFramework] GenerateFrameworkAuditScopeReportRequest complianceFramework - */ - - /** - * Constructs a new GenerateFrameworkAuditScopeReportRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a GenerateFrameworkAuditScopeReportRequest. - * @implements IGenerateFrameworkAuditScopeReportRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest=} [properties] Properties to set - */ - function GenerateFrameworkAuditScopeReportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenerateFrameworkAuditScopeReportRequest scope. - * @member {string} scope - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @instance - */ - GenerateFrameworkAuditScopeReportRequest.prototype.scope = ""; - - /** - * GenerateFrameworkAuditScopeReportRequest reportFormat. - * @member {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format} reportFormat - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @instance - */ - GenerateFrameworkAuditScopeReportRequest.prototype.reportFormat = 0; - - /** - * GenerateFrameworkAuditScopeReportRequest complianceFramework. - * @member {string} complianceFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @instance - */ - GenerateFrameworkAuditScopeReportRequest.prototype.complianceFramework = ""; - - /** - * Creates a new GenerateFrameworkAuditScopeReportRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest instance - */ - GenerateFrameworkAuditScopeReportRequest.create = function create(properties) { - return new GenerateFrameworkAuditScopeReportRequest(properties); - }; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} message GenerateFrameworkAuditScopeReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateFrameworkAuditScopeReportRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.scope); - if (message.reportFormat != null && Object.hasOwnProperty.call(message, "reportFormat")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reportFormat); - if (message.complianceFramework != null && Object.hasOwnProperty.call(message, "complianceFramework")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.complianceFramework); - return writer; - }; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest} message GenerateFrameworkAuditScopeReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateFrameworkAuditScopeReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateFrameworkAuditScopeReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.scope = reader.string(); - break; - } - case 2: { - message.reportFormat = reader.int32(); - break; - } - case 3: { - message.complianceFramework = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenerateFrameworkAuditScopeReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateFrameworkAuditScopeReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenerateFrameworkAuditScopeReportRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenerateFrameworkAuditScopeReportRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - if (!$util.isString(message.scope)) - return "scope: string expected"; - if (message.reportFormat != null && message.hasOwnProperty("reportFormat")) - switch (message.reportFormat) { - default: - return "reportFormat: enum value expected"; - case 0: - case 1: - break; - } - if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) - if (!$util.isString(message.complianceFramework)) - return "complianceFramework: string expected"; - return null; - }; - - /** - * Creates a GenerateFrameworkAuditScopeReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} GenerateFrameworkAuditScopeReportRequest - */ - GenerateFrameworkAuditScopeReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest(); - if (object.scope != null) - message.scope = String(object.scope); - switch (object.reportFormat) { - default: - if (typeof object.reportFormat === "number") { - message.reportFormat = object.reportFormat; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.reportFormat = 0; - break; - case "ODF": - case 1: - message.reportFormat = 1; - break; - } - if (object.complianceFramework != null) - message.complianceFramework = String(object.complianceFramework); - return message; - }; - - /** - * Creates a plain object from a GenerateFrameworkAuditScopeReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest} message GenerateFrameworkAuditScopeReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenerateFrameworkAuditScopeReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.scope = ""; - object.reportFormat = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - object.complianceFramework = ""; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = message.scope; - if (message.reportFormat != null && message.hasOwnProperty("reportFormat")) - object.reportFormat = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format[message.reportFormat] === undefined ? message.reportFormat : $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format[message.reportFormat] : message.reportFormat; - if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) - object.complianceFramework = message.complianceFramework; - return object; - }; - - /** - * Converts this GenerateFrameworkAuditScopeReportRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @instance - * @returns {Object.} JSON object - */ - GenerateFrameworkAuditScopeReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenerateFrameworkAuditScopeReportRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenerateFrameworkAuditScopeReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest"; - }; - - /** - * Format enum. - * @name google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} ODF=1 ODF value - */ - GenerateFrameworkAuditScopeReportRequest.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "ODF"] = 1; - return values; - })(); - - return GenerateFrameworkAuditScopeReportRequest; - })(); - - v1.GenerateFrameworkAuditScopeReportResponse = (function() { - - /** - * Properties of a GenerateFrameworkAuditScopeReportResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IGenerateFrameworkAuditScopeReportResponse - * @property {Uint8Array|null} [scopeReportContents] GenerateFrameworkAuditScopeReportResponse scopeReportContents - * @property {string|null} [name] GenerateFrameworkAuditScopeReportResponse name - * @property {string|null} [complianceFramework] GenerateFrameworkAuditScopeReportResponse complianceFramework - */ - - /** - * Constructs a new GenerateFrameworkAuditScopeReportResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a GenerateFrameworkAuditScopeReportResponse. - * @implements IGenerateFrameworkAuditScopeReportResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse=} [properties] Properties to set - */ - function GenerateFrameworkAuditScopeReportResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenerateFrameworkAuditScopeReportResponse scopeReportContents. - * @member {Uint8Array|null|undefined} scopeReportContents - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @instance - */ - GenerateFrameworkAuditScopeReportResponse.prototype.scopeReportContents = null; - - /** - * GenerateFrameworkAuditScopeReportResponse name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @instance - */ - GenerateFrameworkAuditScopeReportResponse.prototype.name = ""; - - /** - * GenerateFrameworkAuditScopeReportResponse complianceFramework. - * @member {string} complianceFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @instance - */ - GenerateFrameworkAuditScopeReportResponse.prototype.complianceFramework = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GenerateFrameworkAuditScopeReportResponse auditReport. - * @member {"scopeReportContents"|undefined} auditReport - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @instance - */ - Object.defineProperty(GenerateFrameworkAuditScopeReportResponse.prototype, "auditReport", { - get: $util.oneOfGetter($oneOfFields = ["scopeReportContents"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GenerateFrameworkAuditScopeReportResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse instance - */ - GenerateFrameworkAuditScopeReportResponse.create = function create(properties) { - return new GenerateFrameworkAuditScopeReportResponse(properties); - }; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse} message GenerateFrameworkAuditScopeReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateFrameworkAuditScopeReportResponse.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.complianceFramework != null && Object.hasOwnProperty.call(message, "complianceFramework")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.complianceFramework); - if (message.scopeReportContents != null && Object.hasOwnProperty.call(message, "scopeReportContents")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.scopeReportContents); - return writer; - }; - - /** - * Encodes the specified GenerateFrameworkAuditScopeReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse} message GenerateFrameworkAuditScopeReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateFrameworkAuditScopeReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateFrameworkAuditScopeReportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.scopeReportContents = reader.bytes(); - break; - } - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.complianceFramework = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenerateFrameworkAuditScopeReportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateFrameworkAuditScopeReportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenerateFrameworkAuditScopeReportResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenerateFrameworkAuditScopeReportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.scopeReportContents != null && message.hasOwnProperty("scopeReportContents")) { - properties.auditReport = 1; - if (!(message.scopeReportContents && typeof message.scopeReportContents.length === "number" || $util.isString(message.scopeReportContents))) - return "scopeReportContents: buffer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) - if (!$util.isString(message.complianceFramework)) - return "complianceFramework: string expected"; - return null; - }; - - /** - * Creates a GenerateFrameworkAuditScopeReportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} GenerateFrameworkAuditScopeReportResponse - */ - GenerateFrameworkAuditScopeReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse(); - if (object.scopeReportContents != null) - if (typeof object.scopeReportContents === "string") - $util.base64.decode(object.scopeReportContents, message.scopeReportContents = $util.newBuffer($util.base64.length(object.scopeReportContents)), 0); - else if (object.scopeReportContents.length >= 0) - message.scopeReportContents = object.scopeReportContents; - if (object.name != null) - message.name = String(object.name); - if (object.complianceFramework != null) - message.complianceFramework = String(object.complianceFramework); - return message; - }; - - /** - * Creates a plain object from a GenerateFrameworkAuditScopeReportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse} message GenerateFrameworkAuditScopeReportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenerateFrameworkAuditScopeReportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.complianceFramework = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) - object.complianceFramework = message.complianceFramework; - if (message.scopeReportContents != null && message.hasOwnProperty("scopeReportContents")) { - object.scopeReportContents = options.bytes === String ? $util.base64.encode(message.scopeReportContents, 0, message.scopeReportContents.length) : options.bytes === Array ? Array.prototype.slice.call(message.scopeReportContents) : message.scopeReportContents; - if (options.oneofs) - object.auditReport = "scopeReportContents"; - } - return object; - }; - - /** - * Converts this GenerateFrameworkAuditScopeReportResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @instance - * @returns {Object.} JSON object - */ - GenerateFrameworkAuditScopeReportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenerateFrameworkAuditScopeReportResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenerateFrameworkAuditScopeReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse"; - }; - - return GenerateFrameworkAuditScopeReportResponse; - })(); - - v1.ReportSummary = (function() { - - /** - * Properties of a ReportSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IReportSummary - * @property {number|null} [totalCount] ReportSummary totalCount - * @property {number|null} [compliantCount] ReportSummary compliantCount - * @property {number|null} [violationCount] ReportSummary violationCount - * @property {number|null} [manualReviewNeededCount] ReportSummary manualReviewNeededCount - * @property {number|null} [errorCount] ReportSummary errorCount - */ - - /** - * Constructs a new ReportSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ReportSummary. - * @implements IReportSummary - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary=} [properties] Properties to set - */ - function ReportSummary(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReportSummary totalCount. - * @member {number} totalCount - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @instance - */ - ReportSummary.prototype.totalCount = 0; - - /** - * ReportSummary compliantCount. - * @member {number} compliantCount - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @instance - */ - ReportSummary.prototype.compliantCount = 0; - - /** - * ReportSummary violationCount. - * @member {number} violationCount - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @instance - */ - ReportSummary.prototype.violationCount = 0; - - /** - * ReportSummary manualReviewNeededCount. - * @member {number} manualReviewNeededCount - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @instance - */ - ReportSummary.prototype.manualReviewNeededCount = 0; - - /** - * ReportSummary errorCount. - * @member {number} errorCount - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @instance - */ - ReportSummary.prototype.errorCount = 0; - - /** - * Creates a new ReportSummary instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary instance - */ - ReportSummary.create = function create(properties) { - return new ReportSummary(properties); - }; - - /** - * Encodes the specified ReportSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary} message ReportSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalCount); - if (message.compliantCount != null && Object.hasOwnProperty.call(message, "compliantCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compliantCount); - if (message.violationCount != null && Object.hasOwnProperty.call(message, "violationCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.violationCount); - if (message.manualReviewNeededCount != null && Object.hasOwnProperty.call(message, "manualReviewNeededCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.manualReviewNeededCount); - if (message.errorCount != null && Object.hasOwnProperty.call(message, "errorCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.errorCount); - return writer; - }; - - /** - * Encodes the specified ReportSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IReportSummary} message ReportSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReportSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReportSummary message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportSummary.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.totalCount = reader.int32(); - break; - } - case 2: { - message.compliantCount = reader.int32(); - break; - } - case 3: { - message.violationCount = reader.int32(); - break; - } - case 4: { - message.manualReviewNeededCount = reader.int32(); - break; - } - case 5: { - message.errorCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReportSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReportSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReportSummary message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReportSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - if (!$util.isInteger(message.totalCount)) - return "totalCount: integer expected"; - if (message.compliantCount != null && message.hasOwnProperty("compliantCount")) - if (!$util.isInteger(message.compliantCount)) - return "compliantCount: integer expected"; - if (message.violationCount != null && message.hasOwnProperty("violationCount")) - if (!$util.isInteger(message.violationCount)) - return "violationCount: integer expected"; - if (message.manualReviewNeededCount != null && message.hasOwnProperty("manualReviewNeededCount")) - if (!$util.isInteger(message.manualReviewNeededCount)) - return "manualReviewNeededCount: integer expected"; - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - if (!$util.isInteger(message.errorCount)) - return "errorCount: integer expected"; - return null; - }; - - /** - * Creates a ReportSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ReportSummary} ReportSummary - */ - ReportSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary(); - if (object.totalCount != null) - message.totalCount = object.totalCount | 0; - if (object.compliantCount != null) - message.compliantCount = object.compliantCount | 0; - if (object.violationCount != null) - message.violationCount = object.violationCount | 0; - if (object.manualReviewNeededCount != null) - message.manualReviewNeededCount = object.manualReviewNeededCount | 0; - if (object.errorCount != null) - message.errorCount = object.errorCount | 0; - return message; - }; - - /** - * Creates a plain object from a ReportSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ReportSummary} message ReportSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReportSummary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.totalCount = 0; - object.compliantCount = 0; - object.violationCount = 0; - object.manualReviewNeededCount = 0; - object.errorCount = 0; - } - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - object.totalCount = message.totalCount; - if (message.compliantCount != null && message.hasOwnProperty("compliantCount")) - object.compliantCount = message.compliantCount; - if (message.violationCount != null && message.hasOwnProperty("violationCount")) - object.violationCount = message.violationCount; - if (message.manualReviewNeededCount != null && message.hasOwnProperty("manualReviewNeededCount")) - object.manualReviewNeededCount = message.manualReviewNeededCount; - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - object.errorCount = message.errorCount; - return object; - }; - - /** - * Converts this ReportSummary to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @instance - * @returns {Object.} JSON object - */ - ReportSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReportSummary - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ReportSummary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReportSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ReportSummary"; - }; - - return ReportSummary; - })(); - - v1.CreateFrameworkAuditRequest = (function() { - - /** - * Properties of a CreateFrameworkAuditRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICreateFrameworkAuditRequest - * @property {string|null} [parent] CreateFrameworkAuditRequest parent - * @property {string|null} [frameworkAuditId] CreateFrameworkAuditRequest frameworkAuditId - * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null} [frameworkAudit] CreateFrameworkAuditRequest frameworkAudit - */ - - /** - * Constructs a new CreateFrameworkAuditRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CreateFrameworkAuditRequest. - * @implements ICreateFrameworkAuditRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest=} [properties] Properties to set - */ - function CreateFrameworkAuditRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateFrameworkAuditRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @instance - */ - CreateFrameworkAuditRequest.prototype.parent = ""; - - /** - * CreateFrameworkAuditRequest frameworkAuditId. - * @member {string} frameworkAuditId - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @instance - */ - CreateFrameworkAuditRequest.prototype.frameworkAuditId = ""; - - /** - * CreateFrameworkAuditRequest frameworkAudit. - * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null|undefined} frameworkAudit - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @instance - */ - CreateFrameworkAuditRequest.prototype.frameworkAudit = null; - - /** - * Creates a new CreateFrameworkAuditRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest instance - */ - CreateFrameworkAuditRequest.create = function create(properties) { - return new CreateFrameworkAuditRequest(properties); - }; - - /** - * Encodes the specified CreateFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} message CreateFrameworkAuditRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFrameworkAuditRequest.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.frameworkAuditId != null && Object.hasOwnProperty.call(message, "frameworkAuditId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkAuditId); - if (message.frameworkAudit != null && Object.hasOwnProperty.call(message, "frameworkAudit")) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.encode(message.frameworkAudit, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest} message CreateFrameworkAuditRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFrameworkAuditRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateFrameworkAuditRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.frameworkAuditId = reader.string(); - break; - } - case 3: { - message.frameworkAudit = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateFrameworkAuditRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateFrameworkAuditRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateFrameworkAuditRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateFrameworkAuditRequest.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.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) - if (!$util.isString(message.frameworkAuditId)) - return "frameworkAuditId: string expected"; - if (message.frameworkAudit != null && message.hasOwnProperty("frameworkAudit")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify(message.frameworkAudit); - if (error) - return "frameworkAudit." + error; - } - return null; - }; - - /** - * Creates a CreateFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} CreateFrameworkAuditRequest - */ - CreateFrameworkAuditRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.frameworkAuditId != null) - message.frameworkAuditId = String(object.frameworkAuditId); - if (object.frameworkAudit != null) { - if (typeof object.frameworkAudit !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest.frameworkAudit: object expected"); - message.frameworkAudit = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.fromObject(object.frameworkAudit); - } - return message; - }; - - /** - * Creates a plain object from a CreateFrameworkAuditRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest} message CreateFrameworkAuditRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateFrameworkAuditRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.frameworkAuditId = ""; - object.frameworkAudit = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) - object.frameworkAuditId = message.frameworkAuditId; - if (message.frameworkAudit != null && message.hasOwnProperty("frameworkAudit")) - object.frameworkAudit = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.toObject(message.frameworkAudit, options); - return object; - }; - - /** - * Converts this CreateFrameworkAuditRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @instance - * @returns {Object.} JSON object - */ - CreateFrameworkAuditRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateFrameworkAuditRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateFrameworkAuditRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest"; - }; - - return CreateFrameworkAuditRequest; - })(); - - v1.FrameworkAuditDestination = (function() { - - /** - * Properties of a FrameworkAuditDestination. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFrameworkAuditDestination - * @property {google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null} [bucket] FrameworkAuditDestination bucket - */ - - /** - * Constructs a new FrameworkAuditDestination. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FrameworkAuditDestination. - * @implements IFrameworkAuditDestination - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination=} [properties] Properties to set - */ - function FrameworkAuditDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FrameworkAuditDestination bucket. - * @member {google.cloud.cloudsecuritycompliance.v1.IBucketDestination|null|undefined} bucket - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @instance - */ - FrameworkAuditDestination.prototype.bucket = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FrameworkAuditDestination destinationType. - * @member {"bucket"|undefined} destinationType - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @instance - */ - Object.defineProperty(FrameworkAuditDestination.prototype, "destinationType", { - get: $util.oneOfGetter($oneOfFields = ["bucket"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FrameworkAuditDestination instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination instance - */ - FrameworkAuditDestination.create = function create(properties) { - return new FrameworkAuditDestination(properties); - }; - - /** - * Encodes the specified FrameworkAuditDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination} message FrameworkAuditDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkAuditDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.encode(message.bucket, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FrameworkAuditDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination} message FrameworkAuditDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkAuditDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FrameworkAuditDestination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkAuditDestination.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.bucket = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FrameworkAuditDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkAuditDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FrameworkAuditDestination message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FrameworkAuditDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - properties.destinationType = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify(message.bucket); - if (error) - return "bucket." + error; - } - } - return null; - }; - - /** - * Creates a FrameworkAuditDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} FrameworkAuditDestination - */ - FrameworkAuditDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination(); - if (object.bucket != null) { - if (typeof object.bucket !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.bucket: object expected"); - message.bucket = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.fromObject(object.bucket); - } - return message; - }; - - /** - * Creates a plain object from a FrameworkAuditDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination} message FrameworkAuditDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameworkAuditDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.bucket != null && message.hasOwnProperty("bucket")) { - object.bucket = $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.toObject(message.bucket, options); - if (options.oneofs) - object.destinationType = "bucket"; - } - return object; - }; - - /** - * Converts this FrameworkAuditDestination to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @instance - * @returns {Object.} JSON object - */ - FrameworkAuditDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FrameworkAuditDestination - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FrameworkAuditDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination"; - }; - - return FrameworkAuditDestination; - })(); - - v1.BucketDestination = (function() { - - /** - * Properties of a BucketDestination. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IBucketDestination - * @property {string|null} [bucketUri] BucketDestination bucketUri - * @property {google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format|null} [frameworkAuditFormat] BucketDestination frameworkAuditFormat - */ - - /** - * Constructs a new BucketDestination. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a BucketDestination. - * @implements IBucketDestination - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination=} [properties] Properties to set - */ - function BucketDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BucketDestination bucketUri. - * @member {string} bucketUri - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @instance - */ - BucketDestination.prototype.bucketUri = ""; - - /** - * BucketDestination frameworkAuditFormat. - * @member {google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format} frameworkAuditFormat - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @instance - */ - BucketDestination.prototype.frameworkAuditFormat = 0; - - /** - * Creates a new BucketDestination instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination instance - */ - BucketDestination.create = function create(properties) { - return new BucketDestination(properties); - }; - - /** - * Encodes the specified BucketDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination} message BucketDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BucketDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucketUri != null && Object.hasOwnProperty.call(message, "bucketUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketUri); - if (message.frameworkAuditFormat != null && Object.hasOwnProperty.call(message, "frameworkAuditFormat")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.frameworkAuditFormat); - return writer; - }; - - /** - * Encodes the specified BucketDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.BucketDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IBucketDestination} message BucketDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BucketDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BucketDestination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BucketDestination.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.bucketUri = reader.string(); - break; - } - case 3: { - message.frameworkAuditFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BucketDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BucketDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BucketDestination message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BucketDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucketUri != null && message.hasOwnProperty("bucketUri")) - if (!$util.isString(message.bucketUri)) - return "bucketUri: string expected"; - if (message.frameworkAuditFormat != null && message.hasOwnProperty("frameworkAuditFormat")) - switch (message.frameworkAuditFormat) { - default: - return "frameworkAuditFormat: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a BucketDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.BucketDestination} BucketDestination - */ - BucketDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination(); - if (object.bucketUri != null) - message.bucketUri = String(object.bucketUri); - switch (object.frameworkAuditFormat) { - default: - if (typeof object.frameworkAuditFormat === "number") { - message.frameworkAuditFormat = object.frameworkAuditFormat; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.frameworkAuditFormat = 0; - break; - case "ODF": - case 1: - message.frameworkAuditFormat = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a BucketDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.BucketDestination} message BucketDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BucketDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bucketUri = ""; - object.frameworkAuditFormat = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - } - if (message.bucketUri != null && message.hasOwnProperty("bucketUri")) - object.bucketUri = message.bucketUri; - if (message.frameworkAuditFormat != null && message.hasOwnProperty("frameworkAuditFormat")) - object.frameworkAuditFormat = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format[message.frameworkAuditFormat] === undefined ? message.frameworkAuditFormat : $root.google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format[message.frameworkAuditFormat] : message.frameworkAuditFormat; - return object; - }; - - /** - * Converts this BucketDestination to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @instance - * @returns {Object.} JSON object - */ - BucketDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BucketDestination - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.BucketDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BucketDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.BucketDestination"; - }; - - /** - * Format enum. - * @name google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} ODF=1 ODF value - */ - BucketDestination.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "ODF"] = 1; - return values; - })(); - - return BucketDestination; - })(); - - v1.FrameworkAudit = (function() { - - /** - * Properties of a FrameworkAudit. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFrameworkAudit - * @property {string|null} [name] FrameworkAudit name - * @property {string|null} [frameworkAuditId] FrameworkAudit frameworkAuditId - * @property {string|null} [complianceFramework] FrameworkAudit complianceFramework - * @property {string|null} [scope] FrameworkAudit scope - * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null} [frameworkAuditDestination] FrameworkAudit frameworkAuditDestination - * @property {google.protobuf.ITimestamp|null} [startTime] FrameworkAudit startTime - * @property {google.protobuf.ITimestamp|null} [finishTime] FrameworkAudit finishTime - * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] FrameworkAudit complianceState - * @property {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null} [reportSummary] FrameworkAudit reportSummary - * @property {Array.|null} [cloudControlGroupAuditDetails] FrameworkAudit cloudControlGroupAuditDetails - * @property {Array.|null} [cloudControlAuditDetails] FrameworkAudit cloudControlAuditDetails - * @property {string|null} [operationId] FrameworkAudit operationId - * @property {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State|null} [state] FrameworkAudit state - */ - - /** - * Constructs a new FrameworkAudit. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FrameworkAudit. - * @implements IFrameworkAudit - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit=} [properties] Properties to set - */ - function FrameworkAudit(properties) { - this.cloudControlGroupAuditDetails = []; - this.cloudControlAuditDetails = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FrameworkAudit name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.name = ""; - - /** - * FrameworkAudit frameworkAuditId. - * @member {string} frameworkAuditId - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.frameworkAuditId = ""; - - /** - * FrameworkAudit complianceFramework. - * @member {string} complianceFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.complianceFramework = ""; - - /** - * FrameworkAudit scope. - * @member {string} scope - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.scope = ""; - - /** - * FrameworkAudit frameworkAuditDestination. - * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkAuditDestination|null|undefined} frameworkAuditDestination - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.frameworkAuditDestination = null; - - /** - * FrameworkAudit startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.startTime = null; - - /** - * FrameworkAudit finishTime. - * @member {google.protobuf.ITimestamp|null|undefined} finishTime - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.finishTime = null; - - /** - * FrameworkAudit complianceState. - * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.complianceState = 0; - - /** - * FrameworkAudit reportSummary. - * @member {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null|undefined} reportSummary - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.reportSummary = null; - - /** - * FrameworkAudit cloudControlGroupAuditDetails. - * @member {Array.} cloudControlGroupAuditDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.cloudControlGroupAuditDetails = $util.emptyArray; - - /** - * FrameworkAudit cloudControlAuditDetails. - * @member {Array.} cloudControlAuditDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.cloudControlAuditDetails = $util.emptyArray; - - /** - * FrameworkAudit operationId. - * @member {string} operationId - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.operationId = ""; - - /** - * FrameworkAudit state. - * @member {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State} state - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - */ - FrameworkAudit.prototype.state = 0; - - /** - * Creates a new FrameworkAudit instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit instance - */ - FrameworkAudit.create = function create(properties) { - return new FrameworkAudit(properties); - }; - - /** - * Encodes the specified FrameworkAudit message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit} message FrameworkAudit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkAudit.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.frameworkAuditId != null && Object.hasOwnProperty.call(message, "frameworkAuditId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkAuditId); - if (message.complianceFramework != null && Object.hasOwnProperty.call(message, "complianceFramework")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.complianceFramework); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.scope); - if (message.frameworkAuditDestination != null && Object.hasOwnProperty.call(message, "frameworkAuditDestination")) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.encode(message.frameworkAuditDestination, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.complianceState); - if (message.reportSummary != null && Object.hasOwnProperty.call(message, "reportSummary")) - $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.encode(message.reportSummary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.cloudControlGroupAuditDetails != null && message.cloudControlGroupAuditDetails.length) - for (var i = 0; i < message.cloudControlGroupAuditDetails.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.encode(message.cloudControlGroupAuditDetails[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.cloudControlAuditDetails != null && message.cloudControlAuditDetails.length) - for (var i = 0; i < message.cloudControlAuditDetails.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.encode(message.cloudControlAuditDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.operationId); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); - return writer; - }; - - /** - * Encodes the specified FrameworkAudit message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit} message FrameworkAudit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkAudit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FrameworkAudit message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkAudit.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.frameworkAuditId = reader.string(); - break; - } - case 3: { - message.complianceFramework = reader.string(); - break; - } - case 4: { - message.scope = reader.string(); - break; - } - case 5: { - message.frameworkAuditDestination = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.decode(reader, reader.uint32()); - break; - } - case 6: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.complianceState = reader.int32(); - break; - } - case 9: { - message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.cloudControlGroupAuditDetails && message.cloudControlGroupAuditDetails.length)) - message.cloudControlGroupAuditDetails = []; - message.cloudControlGroupAuditDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.decode(reader, reader.uint32())); - break; - } - case 11: { - if (!(message.cloudControlAuditDetails && message.cloudControlAuditDetails.length)) - message.cloudControlAuditDetails = []; - message.cloudControlAuditDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.decode(reader, reader.uint32())); - break; - } - case 12: { - message.operationId = reader.string(); - break; - } - case 13: { - message.state = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FrameworkAudit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkAudit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FrameworkAudit message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FrameworkAudit.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.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) - if (!$util.isString(message.frameworkAuditId)) - return "frameworkAuditId: string expected"; - if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) - if (!$util.isString(message.complianceFramework)) - return "complianceFramework: string expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - if (!$util.isString(message.scope)) - return "scope: string expected"; - if (message.frameworkAuditDestination != null && message.hasOwnProperty("frameworkAuditDestination")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.verify(message.frameworkAuditDestination); - if (error) - return "frameworkAuditDestination." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - if (error) - return "finishTime." + error; - } - if (message.complianceState != null && message.hasOwnProperty("complianceState")) - switch (message.complianceState) { - default: - return "complianceState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify(message.reportSummary); - if (error) - return "reportSummary." + error; - } - if (message.cloudControlGroupAuditDetails != null && message.hasOwnProperty("cloudControlGroupAuditDetails")) { - if (!Array.isArray(message.cloudControlGroupAuditDetails)) - return "cloudControlGroupAuditDetails: array expected"; - for (var i = 0; i < message.cloudControlGroupAuditDetails.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify(message.cloudControlGroupAuditDetails[i]); - if (error) - return "cloudControlGroupAuditDetails." + error; - } - } - if (message.cloudControlAuditDetails != null && message.hasOwnProperty("cloudControlAuditDetails")) { - if (!Array.isArray(message.cloudControlAuditDetails)) - return "cloudControlAuditDetails: array expected"; - for (var i = 0; i < message.cloudControlAuditDetails.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify(message.cloudControlAuditDetails[i]); - if (error) - return "cloudControlAuditDetails." + error; - } - } - if (message.operationId != null && message.hasOwnProperty("operationId")) - if (!$util.isString(message.operationId)) - return "operationId: string expected"; - 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: - case 5: - break; - } - return null; - }; - - /** - * Creates a FrameworkAudit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} FrameworkAudit - */ - FrameworkAudit.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit(); - if (object.name != null) - message.name = String(object.name); - if (object.frameworkAuditId != null) - message.frameworkAuditId = String(object.frameworkAuditId); - if (object.complianceFramework != null) - message.complianceFramework = String(object.complianceFramework); - if (object.scope != null) - message.scope = String(object.scope); - if (object.frameworkAuditDestination != null) { - if (typeof object.frameworkAuditDestination !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.frameworkAuditDestination: object expected"); - message.frameworkAuditDestination = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.fromObject(object.frameworkAuditDestination); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); - } - switch (object.complianceState) { - default: - if (typeof object.complianceState === "number") { - message.complianceState = object.complianceState; - break; - } - break; - case "COMPLIANCE_STATE_UNSPECIFIED": - case 0: - message.complianceState = 0; - break; - case "COMPLIANT": - case 1: - message.complianceState = 1; - break; - case "VIOLATION": - case 2: - message.complianceState = 2; - break; - case "MANUAL_REVIEW_NEEDED": - case 3: - message.complianceState = 3; - break; - case "ERROR": - case 4: - message.complianceState = 4; - break; - case "AUDIT_NOT_SUPPORTED": - case 5: - message.complianceState = 5; - break; - } - if (object.reportSummary != null) { - if (typeof object.reportSummary !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.reportSummary: object expected"); - message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.fromObject(object.reportSummary); - } - if (object.cloudControlGroupAuditDetails) { - if (!Array.isArray(object.cloudControlGroupAuditDetails)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlGroupAuditDetails: array expected"); - message.cloudControlGroupAuditDetails = []; - for (var i = 0; i < object.cloudControlGroupAuditDetails.length; ++i) { - if (typeof object.cloudControlGroupAuditDetails[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlGroupAuditDetails: object expected"); - message.cloudControlGroupAuditDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.fromObject(object.cloudControlGroupAuditDetails[i]); - } - } - if (object.cloudControlAuditDetails) { - if (!Array.isArray(object.cloudControlAuditDetails)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlAuditDetails: array expected"); - message.cloudControlAuditDetails = []; - for (var i = 0; i < object.cloudControlAuditDetails.length; ++i) { - if (typeof object.cloudControlAuditDetails[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.cloudControlAuditDetails: object expected"); - message.cloudControlAuditDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.fromObject(object.cloudControlAuditDetails[i]); - } - } - if (object.operationId != null) - message.operationId = String(object.operationId); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SCHEDULED": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "UPLOADING": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - } - return message; - }; - - /** - * Creates a plain object from a FrameworkAudit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} message FrameworkAudit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameworkAudit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cloudControlGroupAuditDetails = []; - object.cloudControlAuditDetails = []; - } - if (options.defaults) { - object.name = ""; - object.frameworkAuditId = ""; - object.complianceFramework = ""; - object.scope = ""; - object.frameworkAuditDestination = null; - object.startTime = null; - object.finishTime = null; - object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; - object.reportSummary = null; - object.operationId = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.frameworkAuditId != null && message.hasOwnProperty("frameworkAuditId")) - object.frameworkAuditId = message.frameworkAuditId; - if (message.complianceFramework != null && message.hasOwnProperty("complianceFramework")) - object.complianceFramework = message.complianceFramework; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = message.scope; - if (message.frameworkAuditDestination != null && message.hasOwnProperty("frameworkAuditDestination")) - object.frameworkAuditDestination = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination.toObject(message.frameworkAuditDestination, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; - if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) - object.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.toObject(message.reportSummary, options); - if (message.cloudControlGroupAuditDetails && message.cloudControlGroupAuditDetails.length) { - object.cloudControlGroupAuditDetails = []; - for (var j = 0; j < message.cloudControlGroupAuditDetails.length; ++j) - object.cloudControlGroupAuditDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.toObject(message.cloudControlGroupAuditDetails[j], options); - } - if (message.cloudControlAuditDetails && message.cloudControlAuditDetails.length) { - object.cloudControlAuditDetails = []; - for (var j = 0; j < message.cloudControlAuditDetails.length; ++j) - object.cloudControlAuditDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.toObject(message.cloudControlAuditDetails[j], options); - } - if (message.operationId != null && message.hasOwnProperty("operationId")) - object.operationId = message.operationId; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State[message.state] === undefined ? message.state : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State[message.state] : message.state; - return object; - }; - - /** - * Converts this FrameworkAudit to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @instance - * @returns {Object.} JSON object - */ - FrameworkAudit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FrameworkAudit - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkAudit - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FrameworkAudit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkAudit"; - }; - - /** - * State enum. - * @name google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SCHEDULED=1 SCHEDULED value - * @property {number} RUNNING=2 RUNNING value - * @property {number} UPLOADING=3 UPLOADING value - * @property {number} FAILED=4 FAILED value - * @property {number} SUCCEEDED=5 SUCCEEDED value - */ - FrameworkAudit.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEDULED"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "UPLOADING"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - return values; - })(); - - return FrameworkAudit; - })(); - - v1.ListFrameworkAuditsRequest = (function() { - - /** - * Properties of a ListFrameworkAuditsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworkAuditsRequest - * @property {string|null} [parent] ListFrameworkAuditsRequest parent - * @property {number|null} [pageSize] ListFrameworkAuditsRequest pageSize - * @property {string|null} [pageToken] ListFrameworkAuditsRequest pageToken - * @property {string|null} [filter] ListFrameworkAuditsRequest filter - */ - - /** - * Constructs a new ListFrameworkAuditsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworkAuditsRequest. - * @implements IListFrameworkAuditsRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest=} [properties] Properties to set - */ - function ListFrameworkAuditsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworkAuditsRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @instance - */ - ListFrameworkAuditsRequest.prototype.parent = ""; - - /** - * ListFrameworkAuditsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @instance - */ - ListFrameworkAuditsRequest.prototype.pageSize = 0; - - /** - * ListFrameworkAuditsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @instance - */ - ListFrameworkAuditsRequest.prototype.pageToken = ""; - - /** - * ListFrameworkAuditsRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @instance - */ - ListFrameworkAuditsRequest.prototype.filter = ""; - - /** - * Creates a new ListFrameworkAuditsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest instance - */ - ListFrameworkAuditsRequest.create = function create(properties) { - return new ListFrameworkAuditsRequest(properties); - }; - - /** - * Encodes the specified ListFrameworkAuditsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} message ListFrameworkAuditsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkAuditsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListFrameworkAuditsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest} message ListFrameworkAuditsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkAuditsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkAuditsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFrameworkAuditsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkAuditsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworkAuditsRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworkAuditsRequest.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"; - return null; - }; - - /** - * Creates a ListFrameworkAuditsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} ListFrameworkAuditsRequest - */ - ListFrameworkAuditsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest(); - 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); - return message; - }; - - /** - * Creates a plain object from a ListFrameworkAuditsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest} message ListFrameworkAuditsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworkAuditsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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; - return object; - }; - - /** - * Converts this ListFrameworkAuditsRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @instance - * @returns {Object.} JSON object - */ - ListFrameworkAuditsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworkAuditsRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworkAuditsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest"; - }; - - return ListFrameworkAuditsRequest; - })(); - - v1.ListFrameworkAuditsResponse = (function() { - - /** - * Properties of a ListFrameworkAuditsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworkAuditsResponse - * @property {Array.|null} [frameworkAudits] ListFrameworkAuditsResponse frameworkAudits - * @property {string|null} [nextPageToken] ListFrameworkAuditsResponse nextPageToken - */ - - /** - * Constructs a new ListFrameworkAuditsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworkAuditsResponse. - * @implements IListFrameworkAuditsResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse=} [properties] Properties to set - */ - function ListFrameworkAuditsResponse(properties) { - this.frameworkAudits = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworkAuditsResponse frameworkAudits. - * @member {Array.} frameworkAudits - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @instance - */ - ListFrameworkAuditsResponse.prototype.frameworkAudits = $util.emptyArray; - - /** - * ListFrameworkAuditsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @instance - */ - ListFrameworkAuditsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListFrameworkAuditsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse instance - */ - ListFrameworkAuditsResponse.create = function create(properties) { - return new ListFrameworkAuditsResponse(properties); - }; - - /** - * Encodes the specified ListFrameworkAuditsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse} message ListFrameworkAuditsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkAuditsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.frameworkAudits != null && message.frameworkAudits.length) - for (var i = 0; i < message.frameworkAudits.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.encode(message.frameworkAudits[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 ListFrameworkAuditsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse} message ListFrameworkAuditsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkAuditsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkAuditsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.frameworkAudits && message.frameworkAudits.length)) - message.frameworkAudits = []; - message.frameworkAudits.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFrameworkAuditsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkAuditsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworkAuditsResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworkAuditsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.frameworkAudits != null && message.hasOwnProperty("frameworkAudits")) { - if (!Array.isArray(message.frameworkAudits)) - return "frameworkAudits: array expected"; - for (var i = 0; i < message.frameworkAudits.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.verify(message.frameworkAudits[i]); - if (error) - return "frameworkAudits." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListFrameworkAuditsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} ListFrameworkAuditsResponse - */ - ListFrameworkAuditsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse(); - if (object.frameworkAudits) { - if (!Array.isArray(object.frameworkAudits)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.frameworkAudits: array expected"); - message.frameworkAudits = []; - for (var i = 0; i < object.frameworkAudits.length; ++i) { - if (typeof object.frameworkAudits[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse.frameworkAudits: object expected"); - message.frameworkAudits[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.fromObject(object.frameworkAudits[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListFrameworkAuditsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse} message ListFrameworkAuditsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworkAuditsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.frameworkAudits = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.frameworkAudits && message.frameworkAudits.length) { - object.frameworkAudits = []; - for (var j = 0; j < message.frameworkAudits.length; ++j) - object.frameworkAudits[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.toObject(message.frameworkAudits[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListFrameworkAuditsResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @instance - * @returns {Object.} JSON object - */ - ListFrameworkAuditsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworkAuditsResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworkAuditsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse"; - }; - - return ListFrameworkAuditsResponse; - })(); - - v1.GetFrameworkAuditRequest = (function() { - - /** - * Properties of a GetFrameworkAuditRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IGetFrameworkAuditRequest - * @property {string|null} [name] GetFrameworkAuditRequest name - */ - - /** - * Constructs a new GetFrameworkAuditRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a GetFrameworkAuditRequest. - * @implements IGetFrameworkAuditRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest=} [properties] Properties to set - */ - function GetFrameworkAuditRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetFrameworkAuditRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @instance - */ - GetFrameworkAuditRequest.prototype.name = ""; - - /** - * Creates a new GetFrameworkAuditRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest instance - */ - GetFrameworkAuditRequest.create = function create(properties) { - return new GetFrameworkAuditRequest(properties); - }; - - /** - * Encodes the specified GetFrameworkAuditRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} message GetFrameworkAuditRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFrameworkAuditRequest.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 GetFrameworkAuditRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest} message GetFrameworkAuditRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFrameworkAuditRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFrameworkAuditRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetFrameworkAuditRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFrameworkAuditRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetFrameworkAuditRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetFrameworkAuditRequest.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 GetFrameworkAuditRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} GetFrameworkAuditRequest - */ - GetFrameworkAuditRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetFrameworkAuditRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest} message GetFrameworkAuditRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetFrameworkAuditRequest.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 GetFrameworkAuditRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @instance - * @returns {Object.} JSON object - */ - GetFrameworkAuditRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetFrameworkAuditRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetFrameworkAuditRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest"; - }; - - return GetFrameworkAuditRequest; - })(); - - v1.CloudControlGroupAuditDetails = (function() { - - /** - * Properties of a CloudControlGroupAuditDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlGroupAuditDetails - * @property {string|null} [cloudControlGroupId] CloudControlGroupAuditDetails cloudControlGroupId - * @property {string|null} [displayName] CloudControlGroupAuditDetails displayName - * @property {string|null} [description] CloudControlGroupAuditDetails description - * @property {string|null} [responsibilityType] CloudControlGroupAuditDetails responsibilityType - * @property {string|null} [googleResponsibilityDescription] CloudControlGroupAuditDetails googleResponsibilityDescription - * @property {string|null} [googleResponsibilityImplementation] CloudControlGroupAuditDetails googleResponsibilityImplementation - * @property {string|null} [customerResponsibilityDescription] CloudControlGroupAuditDetails customerResponsibilityDescription - * @property {string|null} [customerResponsibilityImplementation] CloudControlGroupAuditDetails customerResponsibilityImplementation - * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] CloudControlGroupAuditDetails complianceState - * @property {string|null} [controlId] CloudControlGroupAuditDetails controlId - * @property {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null} [controlFamily] CloudControlGroupAuditDetails controlFamily - * @property {Array.|null} [cloudControlDetails] CloudControlGroupAuditDetails cloudControlDetails - * @property {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null} [reportSummary] CloudControlGroupAuditDetails reportSummary - */ - - /** - * Constructs a new CloudControlGroupAuditDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlGroupAuditDetails. - * @implements ICloudControlGroupAuditDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails=} [properties] Properties to set - */ - function CloudControlGroupAuditDetails(properties) { - this.cloudControlDetails = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlGroupAuditDetails cloudControlGroupId. - * @member {string} cloudControlGroupId - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.cloudControlGroupId = ""; - - /** - * CloudControlGroupAuditDetails displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.displayName = ""; - - /** - * CloudControlGroupAuditDetails description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.description = ""; - - /** - * CloudControlGroupAuditDetails responsibilityType. - * @member {string} responsibilityType - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.responsibilityType = ""; - - /** - * CloudControlGroupAuditDetails googleResponsibilityDescription. - * @member {string} googleResponsibilityDescription - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.googleResponsibilityDescription = ""; - - /** - * CloudControlGroupAuditDetails googleResponsibilityImplementation. - * @member {string} googleResponsibilityImplementation - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.googleResponsibilityImplementation = ""; - - /** - * CloudControlGroupAuditDetails customerResponsibilityDescription. - * @member {string} customerResponsibilityDescription - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.customerResponsibilityDescription = ""; - - /** - * CloudControlGroupAuditDetails customerResponsibilityImplementation. - * @member {string} customerResponsibilityImplementation - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.customerResponsibilityImplementation = ""; - - /** - * CloudControlGroupAuditDetails complianceState. - * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.complianceState = 0; - - /** - * CloudControlGroupAuditDetails controlId. - * @member {string} controlId - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.controlId = ""; - - /** - * CloudControlGroupAuditDetails controlFamily. - * @member {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null|undefined} controlFamily - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.controlFamily = null; - - /** - * CloudControlGroupAuditDetails cloudControlDetails. - * @member {Array.} cloudControlDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.cloudControlDetails = $util.emptyArray; - - /** - * CloudControlGroupAuditDetails reportSummary. - * @member {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null|undefined} reportSummary - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - */ - CloudControlGroupAuditDetails.prototype.reportSummary = null; - - /** - * Creates a new CloudControlGroupAuditDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails instance - */ - CloudControlGroupAuditDetails.create = function create(properties) { - return new CloudControlGroupAuditDetails(properties); - }; - - /** - * Encodes the specified CloudControlGroupAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails} message CloudControlGroupAuditDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlGroupAuditDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudControlGroupId != null && Object.hasOwnProperty.call(message, "cloudControlGroupId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControlGroupId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.responsibilityType != null && Object.hasOwnProperty.call(message, "responsibilityType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.responsibilityType); - if (message.googleResponsibilityDescription != null && Object.hasOwnProperty.call(message, "googleResponsibilityDescription")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.googleResponsibilityDescription); - if (message.googleResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "googleResponsibilityImplementation")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.googleResponsibilityImplementation); - if (message.customerResponsibilityDescription != null && Object.hasOwnProperty.call(message, "customerResponsibilityDescription")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.customerResponsibilityDescription); - if (message.customerResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "customerResponsibilityImplementation")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.customerResponsibilityImplementation); - if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.complianceState); - if (message.controlId != null && Object.hasOwnProperty.call(message, "controlId")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.controlId); - if (message.controlFamily != null && Object.hasOwnProperty.call(message, "controlFamily")) - $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.encode(message.controlFamily, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cloudControlDetails != null && message.cloudControlDetails.length) - for (var i = 0; i < message.cloudControlDetails.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.encode(message.cloudControlDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.reportSummary != null && Object.hasOwnProperty.call(message, "reportSummary")) - $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.encode(message.reportSummary, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CloudControlGroupAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlGroupAuditDetails} message CloudControlGroupAuditDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlGroupAuditDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlGroupAuditDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.cloudControlGroupId = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.responsibilityType = reader.string(); - break; - } - case 5: { - message.googleResponsibilityDescription = reader.string(); - break; - } - case 6: { - message.googleResponsibilityImplementation = reader.string(); - break; - } - case 7: { - message.customerResponsibilityDescription = reader.string(); - break; - } - case 8: { - message.customerResponsibilityImplementation = reader.string(); - break; - } - case 9: { - message.complianceState = reader.int32(); - break; - } - case 10: { - message.controlId = reader.string(); - break; - } - case 11: { - message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.cloudControlDetails && message.cloudControlDetails.length)) - message.cloudControlDetails = []; - message.cloudControlDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.decode(reader, reader.uint32())); - break; - } - case 13: { - message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlGroupAuditDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlGroupAuditDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlGroupAuditDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlGroupAuditDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cloudControlGroupId != null && message.hasOwnProperty("cloudControlGroupId")) - if (!$util.isString(message.cloudControlGroupId)) - return "cloudControlGroupId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) - if (!$util.isString(message.responsibilityType)) - return "responsibilityType: string expected"; - if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) - if (!$util.isString(message.googleResponsibilityDescription)) - return "googleResponsibilityDescription: string expected"; - if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) - if (!$util.isString(message.googleResponsibilityImplementation)) - return "googleResponsibilityImplementation: string expected"; - if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) - if (!$util.isString(message.customerResponsibilityDescription)) - return "customerResponsibilityDescription: string expected"; - if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) - if (!$util.isString(message.customerResponsibilityImplementation)) - return "customerResponsibilityImplementation: string expected"; - if (message.complianceState != null && message.hasOwnProperty("complianceState")) - switch (message.complianceState) { - default: - return "complianceState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.controlId != null && message.hasOwnProperty("controlId")) - if (!$util.isString(message.controlId)) - return "controlId: string expected"; - if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify(message.controlFamily); - if (error) - return "controlFamily." + error; - } - if (message.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) { - if (!Array.isArray(message.cloudControlDetails)) - return "cloudControlDetails: array expected"; - for (var i = 0; i < message.cloudControlDetails.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify(message.cloudControlDetails[i]); - if (error) - return "cloudControlDetails." + error; - } - } - if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify(message.reportSummary); - if (error) - return "reportSummary." + error; - } - return null; - }; - - /** - * Creates a CloudControlGroupAuditDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} CloudControlGroupAuditDetails - */ - CloudControlGroupAuditDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails(); - if (object.cloudControlGroupId != null) - message.cloudControlGroupId = String(object.cloudControlGroupId); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.responsibilityType != null) - message.responsibilityType = String(object.responsibilityType); - if (object.googleResponsibilityDescription != null) - message.googleResponsibilityDescription = String(object.googleResponsibilityDescription); - if (object.googleResponsibilityImplementation != null) - message.googleResponsibilityImplementation = String(object.googleResponsibilityImplementation); - if (object.customerResponsibilityDescription != null) - message.customerResponsibilityDescription = String(object.customerResponsibilityDescription); - if (object.customerResponsibilityImplementation != null) - message.customerResponsibilityImplementation = String(object.customerResponsibilityImplementation); - switch (object.complianceState) { - default: - if (typeof object.complianceState === "number") { - message.complianceState = object.complianceState; - break; - } - break; - case "COMPLIANCE_STATE_UNSPECIFIED": - case 0: - message.complianceState = 0; - break; - case "COMPLIANT": - case 1: - message.complianceState = 1; - break; - case "VIOLATION": - case 2: - message.complianceState = 2; - break; - case "MANUAL_REVIEW_NEEDED": - case 3: - message.complianceState = 3; - break; - case "ERROR": - case 4: - message.complianceState = 4; - break; - case "AUDIT_NOT_SUPPORTED": - case 5: - message.complianceState = 5; - break; - } - if (object.controlId != null) - message.controlId = String(object.controlId); - if (object.controlFamily != null) { - if (typeof object.controlFamily !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.controlFamily: object expected"); - message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.fromObject(object.controlFamily); - } - if (object.cloudControlDetails) { - if (!Array.isArray(object.cloudControlDetails)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.cloudControlDetails: array expected"); - message.cloudControlDetails = []; - for (var i = 0; i < object.cloudControlDetails.length; ++i) { - if (typeof object.cloudControlDetails[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.cloudControlDetails: object expected"); - message.cloudControlDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.fromObject(object.cloudControlDetails[i]); - } - } - if (object.reportSummary != null) { - if (typeof object.reportSummary !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails.reportSummary: object expected"); - message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.fromObject(object.reportSummary); - } - return message; - }; - - /** - * Creates a plain object from a CloudControlGroupAuditDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails} message CloudControlGroupAuditDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlGroupAuditDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cloudControlDetails = []; - if (options.defaults) { - object.cloudControlGroupId = ""; - object.displayName = ""; - object.description = ""; - object.responsibilityType = ""; - object.googleResponsibilityDescription = ""; - object.googleResponsibilityImplementation = ""; - object.customerResponsibilityDescription = ""; - object.customerResponsibilityImplementation = ""; - object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; - object.controlId = ""; - object.controlFamily = null; - object.reportSummary = null; - } - if (message.cloudControlGroupId != null && message.hasOwnProperty("cloudControlGroupId")) - object.cloudControlGroupId = message.cloudControlGroupId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) - object.responsibilityType = message.responsibilityType; - if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) - object.googleResponsibilityDescription = message.googleResponsibilityDescription; - if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) - object.googleResponsibilityImplementation = message.googleResponsibilityImplementation; - if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) - object.customerResponsibilityDescription = message.customerResponsibilityDescription; - if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) - object.customerResponsibilityImplementation = message.customerResponsibilityImplementation; - if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; - if (message.controlId != null && message.hasOwnProperty("controlId")) - object.controlId = message.controlId; - if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) - object.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.toObject(message.controlFamily, options); - if (message.cloudControlDetails && message.cloudControlDetails.length) { - object.cloudControlDetails = []; - for (var j = 0; j < message.cloudControlDetails.length; ++j) - object.cloudControlDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.toObject(message.cloudControlDetails[j], options); - } - if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) - object.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.toObject(message.reportSummary, options); - return object; - }; - - /** - * Converts this CloudControlGroupAuditDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @instance - * @returns {Object.} JSON object - */ - CloudControlGroupAuditDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlGroupAuditDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlGroupAuditDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails"; - }; - - return CloudControlGroupAuditDetails; - })(); - - v1.FindingDetails = (function() { - - /** - * Properties of a FindingDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFindingDetails - * @property {string|null} [name] FindingDetails name - * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] FindingDetails complianceState - * @property {google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null} [observation] FindingDetails observation - * @property {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null} [evidence] FindingDetails evidence - */ - - /** - * Constructs a new FindingDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FindingDetails. - * @implements IFindingDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails=} [properties] Properties to set - */ - function FindingDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FindingDetails name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @instance - */ - FindingDetails.prototype.name = ""; - - /** - * FindingDetails complianceState. - * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @instance - */ - FindingDetails.prototype.complianceState = 0; - - /** - * FindingDetails observation. - * @member {google.cloud.cloudsecuritycompliance.v1.IObservationDetails|null|undefined} observation - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @instance - */ - FindingDetails.prototype.observation = null; - - /** - * FindingDetails evidence. - * @member {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails|null|undefined} evidence - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @instance - */ - FindingDetails.prototype.evidence = null; - - /** - * Creates a new FindingDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails instance - */ - FindingDetails.create = function create(properties) { - return new FindingDetails(properties); - }; - - /** - * Encodes the specified FindingDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails} message FindingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindingDetails.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.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.complianceState); - if (message.observation != null && Object.hasOwnProperty.call(message, "observation")) - $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.encode(message.observation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) - $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.encode(message.evidence, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FindingDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingDetails} message FindingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindingDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindingDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindingDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.complianceState = reader.int32(); - break; - } - case 3: { - message.observation = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.decode(reader, reader.uint32()); - break; - } - case 4: { - message.evidence = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FindingDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindingDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FindingDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FindingDetails.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.complianceState != null && message.hasOwnProperty("complianceState")) - switch (message.complianceState) { - default: - return "complianceState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.observation != null && message.hasOwnProperty("observation")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify(message.observation); - if (error) - return "observation." + error; - } - if (message.evidence != null && message.hasOwnProperty("evidence")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify(message.evidence); - if (error) - return "evidence." + error; - } - return null; - }; - - /** - * Creates a FindingDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingDetails} FindingDetails - */ - FindingDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails(); - if (object.name != null) - message.name = String(object.name); - switch (object.complianceState) { - default: - if (typeof object.complianceState === "number") { - message.complianceState = object.complianceState; - break; - } - break; - case "COMPLIANCE_STATE_UNSPECIFIED": - case 0: - message.complianceState = 0; - break; - case "COMPLIANT": - case 1: - message.complianceState = 1; - break; - case "VIOLATION": - case 2: - message.complianceState = 2; - break; - case "MANUAL_REVIEW_NEEDED": - case 3: - message.complianceState = 3; - break; - case "ERROR": - case 4: - message.complianceState = 4; - break; - case "AUDIT_NOT_SUPPORTED": - case 5: - message.complianceState = 5; - break; - } - if (object.observation != null) { - if (typeof object.observation !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingDetails.observation: object expected"); - message.observation = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.fromObject(object.observation); - } - if (object.evidence != null) { - if (typeof object.evidence !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingDetails.evidence: object expected"); - message.evidence = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.fromObject(object.evidence); - } - return message; - }; - - /** - * Creates a plain object from a FindingDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FindingDetails} message FindingDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FindingDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; - object.observation = null; - object.evidence = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; - if (message.observation != null && message.hasOwnProperty("observation")) - object.observation = $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails.toObject(message.observation, options); - if (message.evidence != null && message.hasOwnProperty("evidence")) - object.evidence = $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.toObject(message.evidence, options); - return object; - }; - - /** - * Converts this FindingDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @instance - * @returns {Object.} JSON object - */ - FindingDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FindingDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FindingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FindingDetails"; - }; - - return FindingDetails; - })(); - - v1.ObservationDetails = (function() { - - /** - * Properties of an ObservationDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IObservationDetails - * @property {string|null} [currentValue] ObservationDetails currentValue - * @property {string|null} [expectedValue] ObservationDetails expectedValue - * @property {string|null} [guidance] ObservationDetails guidance - */ - - /** - * Constructs a new ObservationDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an ObservationDetails. - * @implements IObservationDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails=} [properties] Properties to set - */ - function ObservationDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ObservationDetails currentValue. - * @member {string} currentValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @instance - */ - ObservationDetails.prototype.currentValue = ""; - - /** - * ObservationDetails expectedValue. - * @member {string} expectedValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @instance - */ - ObservationDetails.prototype.expectedValue = ""; - - /** - * ObservationDetails guidance. - * @member {string} guidance - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @instance - */ - ObservationDetails.prototype.guidance = ""; - - /** - * Creates a new ObservationDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails instance - */ - ObservationDetails.create = function create(properties) { - return new ObservationDetails(properties); - }; - - /** - * Encodes the specified ObservationDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails} message ObservationDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ObservationDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currentValue != null && Object.hasOwnProperty.call(message, "currentValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currentValue); - if (message.expectedValue != null && Object.hasOwnProperty.call(message, "expectedValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedValue); - if (message.guidance != null && Object.hasOwnProperty.call(message, "guidance")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.guidance); - return writer; - }; - - /** - * Encodes the specified ObservationDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ObservationDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IObservationDetails} message ObservationDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ObservationDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ObservationDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ObservationDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.currentValue = reader.string(); - break; - } - case 2: { - message.expectedValue = reader.string(); - break; - } - case 3: { - message.guidance = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ObservationDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ObservationDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ObservationDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ObservationDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.currentValue != null && message.hasOwnProperty("currentValue")) - if (!$util.isString(message.currentValue)) - return "currentValue: string expected"; - if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) - if (!$util.isString(message.expectedValue)) - return "expectedValue: string expected"; - if (message.guidance != null && message.hasOwnProperty("guidance")) - if (!$util.isString(message.guidance)) - return "guidance: string expected"; - return null; - }; - - /** - * Creates an ObservationDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} ObservationDetails - */ - ObservationDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ObservationDetails(); - if (object.currentValue != null) - message.currentValue = String(object.currentValue); - if (object.expectedValue != null) - message.expectedValue = String(object.expectedValue); - if (object.guidance != null) - message.guidance = String(object.guidance); - return message; - }; - - /** - * Creates a plain object from an ObservationDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ObservationDetails} message ObservationDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ObservationDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.currentValue = ""; - object.expectedValue = ""; - object.guidance = ""; - } - if (message.currentValue != null && message.hasOwnProperty("currentValue")) - object.currentValue = message.currentValue; - if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) - object.expectedValue = message.expectedValue; - if (message.guidance != null && message.hasOwnProperty("guidance")) - object.guidance = message.guidance; - return object; - }; - - /** - * Converts this ObservationDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @instance - * @returns {Object.} JSON object - */ - ObservationDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ObservationDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ObservationDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ObservationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ObservationDetails"; - }; - - return ObservationDetails; - })(); - - v1.EvidenceDetails = (function() { - - /** - * Properties of an EvidenceDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IEvidenceDetails - * @property {string|null} [resource] EvidenceDetails resource - * @property {string|null} [service] EvidenceDetails service - * @property {string|null} [evidencePath] EvidenceDetails evidencePath - */ - - /** - * Constructs a new EvidenceDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an EvidenceDetails. - * @implements IEvidenceDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails=} [properties] Properties to set - */ - function EvidenceDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EvidenceDetails resource. - * @member {string} resource - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @instance - */ - EvidenceDetails.prototype.resource = ""; - - /** - * EvidenceDetails service. - * @member {string} service - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @instance - */ - EvidenceDetails.prototype.service = ""; - - /** - * EvidenceDetails evidencePath. - * @member {string} evidencePath - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @instance - */ - EvidenceDetails.prototype.evidencePath = ""; - - /** - * Creates a new EvidenceDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails instance - */ - EvidenceDetails.create = function create(properties) { - return new EvidenceDetails(properties); - }; - - /** - * Encodes the specified EvidenceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails} message EvidenceDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EvidenceDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.evidencePath != null && Object.hasOwnProperty.call(message, "evidencePath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.evidencePath); - return writer; - }; - - /** - * Encodes the specified EvidenceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.EvidenceDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IEvidenceDetails} message EvidenceDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EvidenceDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EvidenceDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EvidenceDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.evidencePath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EvidenceDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EvidenceDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EvidenceDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EvidenceDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.evidencePath != null && message.hasOwnProperty("evidencePath")) - if (!$util.isString(message.evidencePath)) - return "evidencePath: string expected"; - return null; - }; - - /** - * Creates an EvidenceDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} EvidenceDetails - */ - EvidenceDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.EvidenceDetails(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.service != null) - message.service = String(object.service); - if (object.evidencePath != null) - message.evidencePath = String(object.evidencePath); - return message; - }; - - /** - * Creates a plain object from an EvidenceDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.EvidenceDetails} message EvidenceDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EvidenceDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.service = ""; - object.evidencePath = ""; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.evidencePath != null && message.hasOwnProperty("evidencePath")) - object.evidencePath = message.evidencePath; - return object; - }; - - /** - * Converts this EvidenceDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @instance - * @returns {Object.} JSON object - */ - EvidenceDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EvidenceDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.EvidenceDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EvidenceDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.EvidenceDetails"; - }; - - return EvidenceDetails; - })(); - - v1.CloudControlAuditDetails = (function() { - - /** - * Properties of a CloudControlAuditDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlAuditDetails - * @property {string|null} [cloudControl] CloudControlAuditDetails cloudControl - * @property {string|null} [cloudControlId] CloudControlAuditDetails cloudControlId - * @property {string|null} [cloudControlDescription] CloudControlAuditDetails cloudControlDescription - * @property {google.cloud.cloudsecuritycompliance.v1.ComplianceState|null} [complianceState] CloudControlAuditDetails complianceState - * @property {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null} [reportSummary] CloudControlAuditDetails reportSummary - * @property {Array.|null} [findings] CloudControlAuditDetails findings - */ - - /** - * Constructs a new CloudControlAuditDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlAuditDetails. - * @implements ICloudControlAuditDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails=} [properties] Properties to set - */ - function CloudControlAuditDetails(properties) { - this.findings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlAuditDetails cloudControl. - * @member {string} cloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @instance - */ - CloudControlAuditDetails.prototype.cloudControl = ""; - - /** - * CloudControlAuditDetails cloudControlId. - * @member {string} cloudControlId - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @instance - */ - CloudControlAuditDetails.prototype.cloudControlId = ""; - - /** - * CloudControlAuditDetails cloudControlDescription. - * @member {string} cloudControlDescription - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @instance - */ - CloudControlAuditDetails.prototype.cloudControlDescription = ""; - - /** - * CloudControlAuditDetails complianceState. - * @member {google.cloud.cloudsecuritycompliance.v1.ComplianceState} complianceState - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @instance - */ - CloudControlAuditDetails.prototype.complianceState = 0; - - /** - * CloudControlAuditDetails reportSummary. - * @member {google.cloud.cloudsecuritycompliance.v1.IReportSummary|null|undefined} reportSummary - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @instance - */ - CloudControlAuditDetails.prototype.reportSummary = null; - - /** - * CloudControlAuditDetails findings. - * @member {Array.} findings - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @instance - */ - CloudControlAuditDetails.prototype.findings = $util.emptyArray; - - /** - * Creates a new CloudControlAuditDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails instance - */ - CloudControlAuditDetails.create = function create(properties) { - return new CloudControlAuditDetails(properties); - }; - - /** - * Encodes the specified CloudControlAuditDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails} message CloudControlAuditDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlAuditDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControl); - if (message.cloudControlId != null && Object.hasOwnProperty.call(message, "cloudControlId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudControlId); - if (message.cloudControlDescription != null && Object.hasOwnProperty.call(message, "cloudControlDescription")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cloudControlDescription); - if (message.complianceState != null && Object.hasOwnProperty.call(message, "complianceState")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.complianceState); - if (message.reportSummary != null && Object.hasOwnProperty.call(message, "reportSummary")) - $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.encode(message.reportSummary, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.findings != null && message.findings.length) - for (var i = 0; i < message.findings.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.encode(message.findings[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CloudControlAuditDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAuditDetails} message CloudControlAuditDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlAuditDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlAuditDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlAuditDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.cloudControl = reader.string(); - break; - } - case 2: { - message.cloudControlId = reader.string(); - break; - } - case 3: { - message.cloudControlDescription = reader.string(); - break; - } - case 4: { - message.complianceState = reader.int32(); - break; - } - case 5: { - message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.findings && message.findings.length)) - message.findings = []; - message.findings.push($root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlAuditDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlAuditDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlAuditDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlAuditDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) - if (!$util.isString(message.cloudControl)) - return "cloudControl: string expected"; - if (message.cloudControlId != null && message.hasOwnProperty("cloudControlId")) - if (!$util.isString(message.cloudControlId)) - return "cloudControlId: string expected"; - if (message.cloudControlDescription != null && message.hasOwnProperty("cloudControlDescription")) - if (!$util.isString(message.cloudControlDescription)) - return "cloudControlDescription: string expected"; - if (message.complianceState != null && message.hasOwnProperty("complianceState")) - switch (message.complianceState) { - default: - return "complianceState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.verify(message.reportSummary); - if (error) - return "reportSummary." + error; - } - if (message.findings != null && message.hasOwnProperty("findings")) { - if (!Array.isArray(message.findings)) - return "findings: array expected"; - for (var i = 0; i < message.findings.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.verify(message.findings[i]); - if (error) - return "findings." + error; - } - } - return null; - }; - - /** - * Creates a CloudControlAuditDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} CloudControlAuditDetails - */ - CloudControlAuditDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails(); - if (object.cloudControl != null) - message.cloudControl = String(object.cloudControl); - if (object.cloudControlId != null) - message.cloudControlId = String(object.cloudControlId); - if (object.cloudControlDescription != null) - message.cloudControlDescription = String(object.cloudControlDescription); - switch (object.complianceState) { - default: - if (typeof object.complianceState === "number") { - message.complianceState = object.complianceState; - break; - } - break; - case "COMPLIANCE_STATE_UNSPECIFIED": - case 0: - message.complianceState = 0; - break; - case "COMPLIANT": - case 1: - message.complianceState = 1; - break; - case "VIOLATION": - case 2: - message.complianceState = 2; - break; - case "MANUAL_REVIEW_NEEDED": - case 3: - message.complianceState = 3; - break; - case "ERROR": - case 4: - message.complianceState = 4; - break; - case "AUDIT_NOT_SUPPORTED": - case 5: - message.complianceState = 5; - break; - } - if (object.reportSummary != null) { - if (typeof object.reportSummary !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.reportSummary: object expected"); - message.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.fromObject(object.reportSummary); - } - if (object.findings) { - if (!Array.isArray(object.findings)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.findings: array expected"); - message.findings = []; - for (var i = 0; i < object.findings.length; ++i) { - if (typeof object.findings[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails.findings: object expected"); - message.findings[i] = $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.fromObject(object.findings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CloudControlAuditDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails} message CloudControlAuditDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlAuditDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.findings = []; - if (options.defaults) { - object.cloudControl = ""; - object.cloudControlId = ""; - object.cloudControlDescription = ""; - object.complianceState = options.enums === String ? "COMPLIANCE_STATE_UNSPECIFIED" : 0; - object.reportSummary = null; - } - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) - object.cloudControl = message.cloudControl; - if (message.cloudControlId != null && message.hasOwnProperty("cloudControlId")) - object.cloudControlId = message.cloudControlId; - if (message.cloudControlDescription != null && message.hasOwnProperty("cloudControlDescription")) - object.cloudControlDescription = message.cloudControlDescription; - if (message.complianceState != null && message.hasOwnProperty("complianceState")) - object.complianceState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] === undefined ? message.complianceState : $root.google.cloud.cloudsecuritycompliance.v1.ComplianceState[message.complianceState] : message.complianceState; - if (message.reportSummary != null && message.hasOwnProperty("reportSummary")) - object.reportSummary = $root.google.cloud.cloudsecuritycompliance.v1.ReportSummary.toObject(message.reportSummary, options); - if (message.findings && message.findings.length) { - object.findings = []; - for (var j = 0; j < message.findings.length; ++j) - object.findings[j] = $root.google.cloud.cloudsecuritycompliance.v1.FindingDetails.toObject(message.findings[j], options); - } - return object; - }; - - /** - * Converts this CloudControlAuditDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @instance - * @returns {Object.} JSON object - */ - CloudControlAuditDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlAuditDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlAuditDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails"; - }; - - return CloudControlAuditDetails; - })(); - - /** - * RegulatoryControlResponsibilityType enum. - * @name google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType - * @enum {number} - * @property {number} REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED=0 REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED value - * @property {number} GOOGLE=1 GOOGLE value - * @property {number} CUSTOMER=2 CUSTOMER value - * @property {number} SHARED=3 SHARED value - */ - v1.RegulatoryControlResponsibilityType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GOOGLE"] = 1; - values[valuesById[2] = "CUSTOMER"] = 2; - values[valuesById[3] = "SHARED"] = 3; - return values; - })(); - - /** - * EnforcementMode enum. - * @name google.cloud.cloudsecuritycompliance.v1.EnforcementMode - * @enum {number} - * @property {number} ENFORCEMENT_MODE_UNSPECIFIED=0 ENFORCEMENT_MODE_UNSPECIFIED value - * @property {number} PREVENTIVE=1 PREVENTIVE value - * @property {number} DETECTIVE=2 DETECTIVE value - * @property {number} AUDIT=3 AUDIT value - */ - v1.EnforcementMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENFORCEMENT_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREVENTIVE"] = 1; - values[valuesById[2] = "DETECTIVE"] = 2; - values[valuesById[3] = "AUDIT"] = 3; - return values; - })(); - - /** - * FrameworkCategory enum. - * @name google.cloud.cloudsecuritycompliance.v1.FrameworkCategory - * @enum {number} - * @property {number} FRAMEWORK_CATEGORY_UNSPECIFIED=0 FRAMEWORK_CATEGORY_UNSPECIFIED value - * @property {number} INDUSTRY_DEFINED_STANDARD=1 INDUSTRY_DEFINED_STANDARD value - * @property {number} ASSURED_WORKLOADS=2 ASSURED_WORKLOADS value - * @property {number} DATA_SECURITY=3 DATA_SECURITY value - * @property {number} GOOGLE_BEST_PRACTICES=4 GOOGLE_BEST_PRACTICES value - * @property {number} CUSTOM_FRAMEWORK=5 CUSTOM_FRAMEWORK value - */ - v1.FrameworkCategory = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FRAMEWORK_CATEGORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "INDUSTRY_DEFINED_STANDARD"] = 1; - values[valuesById[2] = "ASSURED_WORKLOADS"] = 2; - values[valuesById[3] = "DATA_SECURITY"] = 3; - values[valuesById[4] = "GOOGLE_BEST_PRACTICES"] = 4; - values[valuesById[5] = "CUSTOM_FRAMEWORK"] = 5; - return values; - })(); - - /** - * CloudControlCategory enum. - * @name google.cloud.cloudsecuritycompliance.v1.CloudControlCategory - * @enum {number} - * @property {number} CLOUD_CONTROL_CATEGORY_UNSPECIFIED=0 CLOUD_CONTROL_CATEGORY_UNSPECIFIED value - * @property {number} CC_CATEGORY_INFRASTRUCTURE=1 CC_CATEGORY_INFRASTRUCTURE value - * @property {number} CC_CATEGORY_ARTIFICIAL_INTELLIGENCE=2 CC_CATEGORY_ARTIFICIAL_INTELLIGENCE value - * @property {number} CC_CATEGORY_PHYSICAL_SECURITY=3 CC_CATEGORY_PHYSICAL_SECURITY value - * @property {number} CC_CATEGORY_DATA_SECURITY=4 CC_CATEGORY_DATA_SECURITY value - * @property {number} CC_CATEGORY_NETWORK_SECURITY=5 CC_CATEGORY_NETWORK_SECURITY value - * @property {number} CC_CATEGORY_INCIDENT_MANAGEMENT=6 CC_CATEGORY_INCIDENT_MANAGEMENT value - * @property {number} CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT=7 CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT value - * @property {number} CC_CATEGORY_ENCRYPTION=8 CC_CATEGORY_ENCRYPTION value - * @property {number} CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE=9 CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE value - * @property {number} CC_CATEGORY_HR_ADMIN_AND_PROCESSES=10 CC_CATEGORY_HR_ADMIN_AND_PROCESSES value - * @property {number} CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT=11 CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT value - * @property {number} CC_CATEGORY_LEGAL_AND_DISCLOSURES=12 CC_CATEGORY_LEGAL_AND_DISCLOSURES value - * @property {number} CC_CATEGORY_VULNERABILITY_MANAGEMENT=13 CC_CATEGORY_VULNERABILITY_MANAGEMENT value - * @property {number} CC_CATEGORY_PRIVACY=14 CC_CATEGORY_PRIVACY value - * @property {number} CC_CATEGORY_BCDR=15 CC_CATEGORY_BCDR value - * @property {number} CC_CATEGORY_ADMIN_ACCESS=16 CC_CATEGORY_ADMIN_ACCESS value - * @property {number} CC_CATEGORY_DATA_RESIDENCY=17 CC_CATEGORY_DATA_RESIDENCY value - * @property {number} CC_CATEGORY_RESOURCE_USAGE_RESTRICTION=18 CC_CATEGORY_RESOURCE_USAGE_RESTRICTION value - * @property {number} CC_CATEGORY_SERVICE_SPECIFIC=19 CC_CATEGORY_SERVICE_SPECIFIC value - */ - v1.CloudControlCategory = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLOUD_CONTROL_CATEGORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "CC_CATEGORY_INFRASTRUCTURE"] = 1; - values[valuesById[2] = "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE"] = 2; - values[valuesById[3] = "CC_CATEGORY_PHYSICAL_SECURITY"] = 3; - values[valuesById[4] = "CC_CATEGORY_DATA_SECURITY"] = 4; - values[valuesById[5] = "CC_CATEGORY_NETWORK_SECURITY"] = 5; - values[valuesById[6] = "CC_CATEGORY_INCIDENT_MANAGEMENT"] = 6; - values[valuesById[7] = "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT"] = 7; - values[valuesById[8] = "CC_CATEGORY_ENCRYPTION"] = 8; - values[valuesById[9] = "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE"] = 9; - values[valuesById[10] = "CC_CATEGORY_HR_ADMIN_AND_PROCESSES"] = 10; - values[valuesById[11] = "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT"] = 11; - values[valuesById[12] = "CC_CATEGORY_LEGAL_AND_DISCLOSURES"] = 12; - values[valuesById[13] = "CC_CATEGORY_VULNERABILITY_MANAGEMENT"] = 13; - values[valuesById[14] = "CC_CATEGORY_PRIVACY"] = 14; - values[valuesById[15] = "CC_CATEGORY_BCDR"] = 15; - values[valuesById[16] = "CC_CATEGORY_ADMIN_ACCESS"] = 16; - values[valuesById[17] = "CC_CATEGORY_DATA_RESIDENCY"] = 17; - values[valuesById[18] = "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION"] = 18; - values[valuesById[19] = "CC_CATEGORY_SERVICE_SPECIFIC"] = 19; - return values; - })(); - - /** - * CloudProvider enum. - * @name google.cloud.cloudsecuritycompliance.v1.CloudProvider - * @enum {number} - * @property {number} CLOUD_PROVIDER_UNSPECIFIED=0 CLOUD_PROVIDER_UNSPECIFIED value - * @property {number} AWS=1 AWS value - * @property {number} AZURE=2 AZURE value - * @property {number} GCP=3 GCP value - */ - v1.CloudProvider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLOUD_PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "AWS"] = 1; - values[valuesById[2] = "AZURE"] = 2; - values[valuesById[3] = "GCP"] = 3; - return values; - })(); - - /** - * Severity enum. - * @name google.cloud.cloudsecuritycompliance.v1.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} HIGH=2 HIGH value - * @property {number} MEDIUM=3 MEDIUM value - * @property {number} LOW=4 LOW value - */ - v1.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "HIGH"] = 2; - values[valuesById[3] = "MEDIUM"] = 3; - values[valuesById[4] = "LOW"] = 4; - return values; - })(); - - /** - * RuleActionType enum. - * @name google.cloud.cloudsecuritycompliance.v1.RuleActionType - * @enum {number} - * @property {number} RULE_ACTION_TYPE_UNSPECIFIED=0 RULE_ACTION_TYPE_UNSPECIFIED value - * @property {number} RULE_ACTION_TYPE_PREVENTIVE=1 RULE_ACTION_TYPE_PREVENTIVE value - * @property {number} RULE_ACTION_TYPE_DETECTIVE=2 RULE_ACTION_TYPE_DETECTIVE value - * @property {number} RULE_ACTION_TYPE_AUDIT=3 RULE_ACTION_TYPE_AUDIT value - */ - v1.RuleActionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RULE_ACTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RULE_ACTION_TYPE_PREVENTIVE"] = 1; - values[valuesById[2] = "RULE_ACTION_TYPE_DETECTIVE"] = 2; - values[valuesById[3] = "RULE_ACTION_TYPE_AUDIT"] = 3; - return values; - })(); - - /** - * TargetResourceType enum. - * @name google.cloud.cloudsecuritycompliance.v1.TargetResourceType - * @enum {number} - * @property {number} TARGET_RESOURCE_TYPE_UNSPECIFIED=0 TARGET_RESOURCE_TYPE_UNSPECIFIED value - * @property {number} TARGET_RESOURCE_CRM_TYPE_ORG=1 TARGET_RESOURCE_CRM_TYPE_ORG value - * @property {number} TARGET_RESOURCE_CRM_TYPE_FOLDER=2 TARGET_RESOURCE_CRM_TYPE_FOLDER value - * @property {number} TARGET_RESOURCE_CRM_TYPE_PROJECT=3 TARGET_RESOURCE_CRM_TYPE_PROJECT value - * @property {number} TARGET_RESOURCE_TYPE_APPLICATION=4 TARGET_RESOURCE_TYPE_APPLICATION value - */ - v1.TargetResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TARGET_RESOURCE_CRM_TYPE_ORG"] = 1; - values[valuesById[2] = "TARGET_RESOURCE_CRM_TYPE_FOLDER"] = 2; - values[valuesById[3] = "TARGET_RESOURCE_CRM_TYPE_PROJECT"] = 3; - values[valuesById[4] = "TARGET_RESOURCE_TYPE_APPLICATION"] = 4; - return values; - })(); - - v1.Framework = (function() { - - /** - * Properties of a Framework. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFramework - * @property {string|null} [name] Framework name - * @property {number|Long|null} [majorRevisionId] Framework majorRevisionId - * @property {string|null} [displayName] Framework displayName - * @property {string|null} [description] Framework description - * @property {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null} [type] Framework type - * @property {Array.|null} [cloudControlDetails] Framework cloudControlDetails - * @property {Array.|null} [category] Framework category - * @property {Array.|null} [supportedCloudProviders] Framework supportedCloudProviders - * @property {Array.|null} [supportedTargetResourceTypes] Framework supportedTargetResourceTypes - * @property {Array.|null} [supportedEnforcementModes] Framework supportedEnforcementModes - */ - - /** - * Constructs a new Framework. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Framework. - * @implements IFramework - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFramework=} [properties] Properties to set - */ - function Framework(properties) { - this.cloudControlDetails = []; - this.category = []; - this.supportedCloudProviders = []; - this.supportedTargetResourceTypes = []; - this.supportedEnforcementModes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Framework name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.name = ""; - - /** - * Framework majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Framework displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.displayName = ""; - - /** - * Framework description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.description = ""; - - /** - * Framework type. - * @member {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType} type - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.type = 0; - - /** - * Framework cloudControlDetails. - * @member {Array.} cloudControlDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.cloudControlDetails = $util.emptyArray; - - /** - * Framework category. - * @member {Array.} category - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.category = $util.emptyArray; - - /** - * Framework supportedCloudProviders. - * @member {Array.} supportedCloudProviders - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.supportedCloudProviders = $util.emptyArray; - - /** - * Framework supportedTargetResourceTypes. - * @member {Array.} supportedTargetResourceTypes - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.supportedTargetResourceTypes = $util.emptyArray; - - /** - * Framework supportedEnforcementModes. - * @member {Array.} supportedEnforcementModes - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - */ - Framework.prototype.supportedEnforcementModes = $util.emptyArray; - - /** - * Creates a new Framework instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFramework=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework instance - */ - Framework.create = function create(properties) { - return new Framework(properties); - }; - - /** - * Encodes the specified Framework message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFramework} message Framework message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Framework.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); - if (message.cloudControlDetails != null && message.cloudControlDetails.length) - for (var i = 0; i < message.cloudControlDetails.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.encode(message.cloudControlDetails[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.category != null && message.category.length) { - writer.uint32(/* id 9, wireType 2 =*/74).fork(); - for (var i = 0; i < message.category.length; ++i) - writer.int32(message.category[i]); - writer.ldelim(); - } - if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - writer.int32(message.supportedCloudProviders[i]); - writer.ldelim(); - } - if (message.supportedTargetResourceTypes != null && message.supportedTargetResourceTypes.length) { - writer.uint32(/* id 11, wireType 2 =*/90).fork(); - for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) - writer.int32(message.supportedTargetResourceTypes[i]); - writer.ldelim(); - } - if (message.supportedEnforcementModes != null && message.supportedEnforcementModes.length) { - writer.uint32(/* id 13, wireType 2 =*/106).fork(); - for (var i = 0; i < message.supportedEnforcementModes.length; ++i) - writer.int32(message.supportedEnforcementModes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Framework message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Framework.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFramework} message Framework message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Framework.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Framework message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Framework.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Framework(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.majorRevisionId = reader.int64(); - break; - } - case 4: { - message.displayName = reader.string(); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.type = reader.int32(); - break; - } - case 8: { - if (!(message.cloudControlDetails && message.cloudControlDetails.length)) - message.cloudControlDetails = []; - message.cloudControlDetails.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.decode(reader, reader.uint32())); - break; - } - case 9: { - if (!(message.category && message.category.length)) - message.category = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.category.push(reader.int32()); - } else - message.category.push(reader.int32()); - break; - } - case 10: { - if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) - message.supportedCloudProviders = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedCloudProviders.push(reader.int32()); - } else - message.supportedCloudProviders.push(reader.int32()); - break; - } - case 11: { - if (!(message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length)) - message.supportedTargetResourceTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedTargetResourceTypes.push(reader.int32()); - } else - message.supportedTargetResourceTypes.push(reader.int32()); - break; - } - case 13: { - if (!(message.supportedEnforcementModes && message.supportedEnforcementModes.length)) - message.supportedEnforcementModes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedEnforcementModes.push(reader.int32()); - } else - message.supportedEnforcementModes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Framework message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Framework.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Framework message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Framework.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: 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.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) { - if (!Array.isArray(message.cloudControlDetails)) - return "cloudControlDetails: array expected"; - for (var i = 0; i < message.cloudControlDetails.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify(message.cloudControlDetails[i]); - if (error) - return "cloudControlDetails." + error; - } - } - if (message.category != null && message.hasOwnProperty("category")) { - if (!Array.isArray(message.category)) - return "category: array expected"; - for (var i = 0; i < message.category.length; ++i) - switch (message.category[i]) { - default: - return "category: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { - if (!Array.isArray(message.supportedCloudProviders)) - return "supportedCloudProviders: array expected"; - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - switch (message.supportedCloudProviders[i]) { - default: - return "supportedCloudProviders: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.supportedTargetResourceTypes != null && message.hasOwnProperty("supportedTargetResourceTypes")) { - if (!Array.isArray(message.supportedTargetResourceTypes)) - return "supportedTargetResourceTypes: array expected"; - for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) - switch (message.supportedTargetResourceTypes[i]) { - default: - return "supportedTargetResourceTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.supportedEnforcementModes != null && message.hasOwnProperty("supportedEnforcementModes")) { - if (!Array.isArray(message.supportedEnforcementModes)) - return "supportedEnforcementModes: array expected"; - for (var i = 0; i < message.supportedEnforcementModes.length; ++i) - switch (message.supportedEnforcementModes[i]) { - default: - return "supportedEnforcementModes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a Framework message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.Framework} Framework - */ - Framework.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Framework) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.Framework(); - if (object.name != null) - message.name = String(object.name); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FRAMEWORK_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BUILT_IN": - case 1: - message.type = 1; - break; - case "CUSTOM": - case 2: - message.type = 2; - break; - } - if (object.cloudControlDetails) { - if (!Array.isArray(object.cloudControlDetails)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.cloudControlDetails: array expected"); - message.cloudControlDetails = []; - for (var i = 0; i < object.cloudControlDetails.length; ++i) { - if (typeof object.cloudControlDetails[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.cloudControlDetails: object expected"); - message.cloudControlDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.fromObject(object.cloudControlDetails[i]); - } - } - if (object.category) { - if (!Array.isArray(object.category)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.category: array expected"); - message.category = []; - for (var i = 0; i < object.category.length; ++i) - switch (object.category[i]) { - default: - if (typeof object.category[i] === "number") { - message.category[i] = object.category[i]; - break; - } - case "FRAMEWORK_CATEGORY_UNSPECIFIED": - case 0: - message.category[i] = 0; - break; - case "INDUSTRY_DEFINED_STANDARD": - case 1: - message.category[i] = 1; - break; - case "ASSURED_WORKLOADS": - case 2: - message.category[i] = 2; - break; - case "DATA_SECURITY": - case 3: - message.category[i] = 3; - break; - case "GOOGLE_BEST_PRACTICES": - case 4: - message.category[i] = 4; - break; - case "CUSTOM_FRAMEWORK": - case 5: - message.category[i] = 5; - break; - } - } - if (object.supportedCloudProviders) { - if (!Array.isArray(object.supportedCloudProviders)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.supportedCloudProviders: array expected"); - message.supportedCloudProviders = []; - for (var i = 0; i < object.supportedCloudProviders.length; ++i) - switch (object.supportedCloudProviders[i]) { - default: - if (typeof object.supportedCloudProviders[i] === "number") { - message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; - break; - } - case "CLOUD_PROVIDER_UNSPECIFIED": - case 0: - message.supportedCloudProviders[i] = 0; - break; - case "AWS": - case 1: - message.supportedCloudProviders[i] = 1; - break; - case "AZURE": - case 2: - message.supportedCloudProviders[i] = 2; - break; - case "GCP": - case 3: - message.supportedCloudProviders[i] = 3; - break; - } - } - if (object.supportedTargetResourceTypes) { - if (!Array.isArray(object.supportedTargetResourceTypes)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.supportedTargetResourceTypes: array expected"); - message.supportedTargetResourceTypes = []; - for (var i = 0; i < object.supportedTargetResourceTypes.length; ++i) - switch (object.supportedTargetResourceTypes[i]) { - default: - if (typeof object.supportedTargetResourceTypes[i] === "number") { - message.supportedTargetResourceTypes[i] = object.supportedTargetResourceTypes[i]; - break; - } - case "TARGET_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.supportedTargetResourceTypes[i] = 0; - break; - case "TARGET_RESOURCE_CRM_TYPE_ORG": - case 1: - message.supportedTargetResourceTypes[i] = 1; - break; - case "TARGET_RESOURCE_CRM_TYPE_FOLDER": - case 2: - message.supportedTargetResourceTypes[i] = 2; - break; - case "TARGET_RESOURCE_CRM_TYPE_PROJECT": - case 3: - message.supportedTargetResourceTypes[i] = 3; - break; - case "TARGET_RESOURCE_TYPE_APPLICATION": - case 4: - message.supportedTargetResourceTypes[i] = 4; - break; - } - } - if (object.supportedEnforcementModes) { - if (!Array.isArray(object.supportedEnforcementModes)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Framework.supportedEnforcementModes: array expected"); - message.supportedEnforcementModes = []; - for (var i = 0; i < object.supportedEnforcementModes.length; ++i) - switch (object.supportedEnforcementModes[i]) { - default: - if (typeof object.supportedEnforcementModes[i] === "number") { - message.supportedEnforcementModes[i] = object.supportedEnforcementModes[i]; - break; - } - case "ENFORCEMENT_MODE_UNSPECIFIED": - case 0: - message.supportedEnforcementModes[i] = 0; - break; - case "PREVENTIVE": - case 1: - message.supportedEnforcementModes[i] = 1; - break; - case "DETECTIVE": - case 2: - message.supportedEnforcementModes[i] = 2; - break; - case "AUDIT": - case 3: - message.supportedEnforcementModes[i] = 3; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Framework message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.Framework} message Framework - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Framework.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cloudControlDetails = []; - object.category = []; - object.supportedCloudProviders = []; - object.supportedTargetResourceTypes = []; - object.supportedEnforcementModes = []; - } - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - object.displayName = ""; - object.description = ""; - object.type = options.enums === String ? "FRAMEWORK_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.type] === undefined ? message.type : $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.type] : message.type; - if (message.cloudControlDetails && message.cloudControlDetails.length) { - object.cloudControlDetails = []; - for (var j = 0; j < message.cloudControlDetails.length; ++j) - object.cloudControlDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.toObject(message.cloudControlDetails[j], options); - } - if (message.category && message.category.length) { - object.category = []; - for (var j = 0; j < message.category.length; ++j) - object.category[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.category[j]] === undefined ? message.category[j] : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.category[j]] : message.category[j]; - } - if (message.supportedCloudProviders && message.supportedCloudProviders.length) { - object.supportedCloudProviders = []; - for (var j = 0; j < message.supportedCloudProviders.length; ++j) - object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; - } - if (message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length) { - object.supportedTargetResourceTypes = []; - for (var j = 0; j < message.supportedTargetResourceTypes.length; ++j) - object.supportedTargetResourceTypes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] === undefined ? message.supportedTargetResourceTypes[j] : $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] : message.supportedTargetResourceTypes[j]; - } - if (message.supportedEnforcementModes && message.supportedEnforcementModes.length) { - object.supportedEnforcementModes = []; - for (var j = 0; j < message.supportedEnforcementModes.length; ++j) - object.supportedEnforcementModes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] === undefined ? message.supportedEnforcementModes[j] : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] : message.supportedEnforcementModes[j]; - } - return object; - }; - - /** - * Converts this Framework to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @instance - * @returns {Object.} JSON object - */ - Framework.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Framework - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.Framework - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Framework.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Framework"; - }; - - /** - * FrameworkType enum. - * @name google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType - * @enum {number} - * @property {number} FRAMEWORK_TYPE_UNSPECIFIED=0 FRAMEWORK_TYPE_UNSPECIFIED value - * @property {number} BUILT_IN=1 BUILT_IN value - * @property {number} CUSTOM=2 CUSTOM value - */ - Framework.FrameworkType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FRAMEWORK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BUILT_IN"] = 1; - values[valuesById[2] = "CUSTOM"] = 2; - return values; - })(); - - return Framework; - })(); - - v1.CloudControlDetails = (function() { - - /** - * Properties of a CloudControlDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlDetails - * @property {string|null} [name] CloudControlDetails name - * @property {number|Long|null} [majorRevisionId] CloudControlDetails majorRevisionId - * @property {Array.|null} [parameters] CloudControlDetails parameters - */ - - /** - * Constructs a new CloudControlDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlDetails. - * @implements ICloudControlDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails=} [properties] Properties to set - */ - function CloudControlDetails(properties) { - this.parameters = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlDetails name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @instance - */ - CloudControlDetails.prototype.name = ""; - - /** - * CloudControlDetails majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @instance - */ - CloudControlDetails.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CloudControlDetails parameters. - * @member {Array.} parameters - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @instance - */ - CloudControlDetails.prototype.parameters = $util.emptyArray; - - /** - * Creates a new CloudControlDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails instance - */ - CloudControlDetails.create = function create(properties) { - return new CloudControlDetails(properties); - }; - - /** - * Encodes the specified CloudControlDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails} message CloudControlDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlDetails.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.Parameter.encode(message.parameters[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CloudControlDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails} message CloudControlDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.majorRevisionId = reader.int64(); - break; - } - case 4: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.cloudsecuritycompliance.v1.Parameter.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlDetails.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } - } - return null; - }; - - /** - * Creates a CloudControlDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} CloudControlDetails - */ - CloudControlDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails(); - if (object.name != null) - message.name = String(object.name); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.parameters: object expected"); - message.parameters[i] = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.fromObject(object.parameters[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CloudControlDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDetails} message CloudControlDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.toObject(message.parameters[j], options); - } - return object; - }; - - /** - * Converts this CloudControlDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @instance - * @returns {Object.} JSON object - */ - CloudControlDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlDetails"; - }; - - return CloudControlDetails; - })(); - - v1.FrameworkReference = (function() { - - /** - * Properties of a FrameworkReference. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFrameworkReference - * @property {string|null} [framework] FrameworkReference framework - * @property {number|Long|null} [majorRevisionId] FrameworkReference majorRevisionId - */ - - /** - * Constructs a new FrameworkReference. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FrameworkReference. - * @implements IFrameworkReference - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference=} [properties] Properties to set - */ - function FrameworkReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FrameworkReference framework. - * @member {string} framework - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @instance - */ - FrameworkReference.prototype.framework = ""; - - /** - * FrameworkReference majorRevisionId. - * @member {number|Long|null|undefined} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @instance - */ - FrameworkReference.prototype.majorRevisionId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(FrameworkReference.prototype, "_majorRevisionId", { - get: $util.oneOfGetter($oneOfFields = ["majorRevisionId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FrameworkReference instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference instance - */ - FrameworkReference.create = function create(properties) { - return new FrameworkReference(properties); - }; - - /** - * Encodes the specified FrameworkReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference} message FrameworkReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); - if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); - return writer; - }; - - /** - * Encodes the specified FrameworkReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference} message FrameworkReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FrameworkReference message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.framework = reader.string(); - break; - } - case 2: { - message.majorRevisionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FrameworkReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FrameworkReference message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FrameworkReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.framework != null && message.hasOwnProperty("framework")) - if (!$util.isString(message.framework)) - return "framework: string expected"; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) { - properties._majorRevisionId = 1; - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - } - return null; - }; - - /** - * Creates a FrameworkReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} FrameworkReference - */ - FrameworkReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference(); - if (object.framework != null) - message.framework = String(object.framework); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a FrameworkReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkReference} message FrameworkReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameworkReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.framework = ""; - if (message.framework != null && message.hasOwnProperty("framework")) - object.framework = message.framework; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) { - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (options.oneofs) - object._majorRevisionId = "majorRevisionId"; - } - return object; - }; - - /** - * Converts this FrameworkReference to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @instance - * @returns {Object.} JSON object - */ - FrameworkReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FrameworkReference - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FrameworkReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkReference"; - }; - - return FrameworkReference; - })(); - - v1.Parameter = (function() { - - /** - * Properties of a Parameter. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IParameter - * @property {string|null} [name] Parameter name - * @property {google.cloud.cloudsecuritycompliance.v1.IParamValue|null} [parameterValue] Parameter parameterValue - */ - - /** - * Constructs a new Parameter. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IParameter=} [properties] Properties to set - */ - function Parameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Parameter name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @instance - */ - Parameter.prototype.name = ""; - - /** - * Parameter parameterValue. - * @member {google.cloud.cloudsecuritycompliance.v1.IParamValue|null|undefined} parameterValue - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @instance - */ - Parameter.prototype.parameterValue = null; - - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameter=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.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.parameterValue != null && Object.hasOwnProperty.call(message, "parameterValue")) - $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.encode(message.parameterValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameter} message Parameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Parameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.parameterValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Parameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Parameter message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Parameter.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.parameterValue != null && message.hasOwnProperty("parameterValue")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.verify(message.parameterValue); - if (error) - return "parameterValue." + error; - } - return null; - }; - - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Parameter) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.Parameter(); - if (object.name != null) - message.name = String(object.name); - if (object.parameterValue != null) { - if (typeof object.parameterValue !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Parameter.parameterValue: object expected"); - message.parameterValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.fromObject(object.parameterValue); - } - return message; - }; - - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.Parameter} message Parameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Parameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.parameterValue = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parameterValue != null && message.hasOwnProperty("parameterValue")) - object.parameterValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.toObject(message.parameterValue, options); - return object; - }; - - /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @instance - * @returns {Object.} JSON object - */ - Parameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Parameter - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.Parameter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Parameter"; - }; - - return Parameter; - })(); - - v1.CloudControl = (function() { - - /** - * Properties of a CloudControl. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControl - * @property {string|null} [name] CloudControl name - * @property {number|Long|null} [majorRevisionId] CloudControl majorRevisionId - * @property {string|null} [description] CloudControl description - * @property {string|null} [displayName] CloudControl displayName - * @property {Array.|null} [supportedEnforcementModes] CloudControl supportedEnforcementModes - * @property {Array.|null} [parameterSpec] CloudControl parameterSpec - * @property {Array.|null} [rules] CloudControl rules - * @property {google.cloud.cloudsecuritycompliance.v1.Severity|null} [severity] CloudControl severity - * @property {string|null} [findingCategory] CloudControl findingCategory - * @property {Array.|null} [supportedCloudProviders] CloudControl supportedCloudProviders - * @property {Array.|null} [relatedFrameworks] CloudControl relatedFrameworks - * @property {string|null} [remediationSteps] CloudControl remediationSteps - * @property {Array.|null} [categories] CloudControl categories - * @property {google.protobuf.ITimestamp|null} [createTime] CloudControl createTime - * @property {Array.|null} [supportedTargetResourceTypes] CloudControl supportedTargetResourceTypes - */ - - /** - * Constructs a new CloudControl. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControl. - * @implements ICloudControl - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl=} [properties] Properties to set - */ - function CloudControl(properties) { - this.supportedEnforcementModes = []; - this.parameterSpec = []; - this.rules = []; - this.supportedCloudProviders = []; - this.relatedFrameworks = []; - this.categories = []; - this.supportedTargetResourceTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControl name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.name = ""; - - /** - * CloudControl majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CloudControl description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.description = ""; - - /** - * CloudControl displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.displayName = ""; - - /** - * CloudControl supportedEnforcementModes. - * @member {Array.} supportedEnforcementModes - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.supportedEnforcementModes = $util.emptyArray; - - /** - * CloudControl parameterSpec. - * @member {Array.} parameterSpec - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.parameterSpec = $util.emptyArray; - - /** - * CloudControl rules. - * @member {Array.} rules - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.rules = $util.emptyArray; - - /** - * CloudControl severity. - * @member {google.cloud.cloudsecuritycompliance.v1.Severity} severity - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.severity = 0; - - /** - * CloudControl findingCategory. - * @member {string} findingCategory - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.findingCategory = ""; - - /** - * CloudControl supportedCloudProviders. - * @member {Array.} supportedCloudProviders - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.supportedCloudProviders = $util.emptyArray; - - /** - * CloudControl relatedFrameworks. - * @member {Array.} relatedFrameworks - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.relatedFrameworks = $util.emptyArray; - - /** - * CloudControl remediationSteps. - * @member {string} remediationSteps - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.remediationSteps = ""; - - /** - * CloudControl categories. - * @member {Array.} categories - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.categories = $util.emptyArray; - - /** - * CloudControl createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.createTime = null; - - /** - * CloudControl supportedTargetResourceTypes. - * @member {Array.} supportedTargetResourceTypes - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - */ - CloudControl.prototype.supportedTargetResourceTypes = $util.emptyArray; - - /** - * Creates a new CloudControl instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl instance - */ - CloudControl.create = function create(properties) { - return new CloudControl(properties); - }; - - /** - * Encodes the specified CloudControl message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl} message CloudControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControl.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.supportedEnforcementModes != null && message.supportedEnforcementModes.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.supportedEnforcementModes.length; ++i) - writer.int32(message.supportedEnforcementModes[i]); - writer.ldelim(); - } - if (message.parameterSpec != null && message.parameterSpec.length) - for (var i = 0; i < message.parameterSpec.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.encode(message.parameterSpec[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.Rule.encode(message.rules[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.severity); - if (message.findingCategory != null && Object.hasOwnProperty.call(message, "findingCategory")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.findingCategory); - if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { - writer.uint32(/* id 13, wireType 2 =*/106).fork(); - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - writer.int32(message.supportedCloudProviders[i]); - writer.ldelim(); - } - if (message.relatedFrameworks != null && message.relatedFrameworks.length) - for (var i = 0; i < message.relatedFrameworks.length; ++i) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.relatedFrameworks[i]); - if (message.remediationSteps != null && Object.hasOwnProperty.call(message, "remediationSteps")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.remediationSteps); - if (message.categories != null && message.categories.length) { - writer.uint32(/* id 16, wireType 2 =*/130).fork(); - for (var i = 0; i < message.categories.length; ++i) - writer.int32(message.categories[i]); - writer.ldelim(); - } - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.supportedTargetResourceTypes != null && message.supportedTargetResourceTypes.length) { - writer.uint32(/* id 18, wireType 2 =*/146).fork(); - for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) - writer.int32(message.supportedTargetResourceTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CloudControl message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControl.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControl} message CloudControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControl.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControl message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControl.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControl(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.majorRevisionId = reader.int64(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 7: { - if (!(message.supportedEnforcementModes && message.supportedEnforcementModes.length)) - message.supportedEnforcementModes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedEnforcementModes.push(reader.int32()); - } else - message.supportedEnforcementModes.push(reader.int32()); - break; - } - case 8: { - if (!(message.parameterSpec && message.parameterSpec.length)) - message.parameterSpec = []; - message.parameterSpec.push($root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.decode(reader, reader.uint32())); - break; - } - case 9: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.cloud.cloudsecuritycompliance.v1.Rule.decode(reader, reader.uint32())); - break; - } - case 11: { - message.severity = reader.int32(); - break; - } - case 12: { - message.findingCategory = reader.string(); - break; - } - case 13: { - if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) - message.supportedCloudProviders = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedCloudProviders.push(reader.int32()); - } else - message.supportedCloudProviders.push(reader.int32()); - break; - } - case 14: { - if (!(message.relatedFrameworks && message.relatedFrameworks.length)) - message.relatedFrameworks = []; - message.relatedFrameworks.push(reader.string()); - break; - } - case 15: { - message.remediationSteps = reader.string(); - break; - } - case 16: { - if (!(message.categories && message.categories.length)) - message.categories = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.categories.push(reader.int32()); - } else - message.categories.push(reader.int32()); - break; - } - case 17: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 18: { - if (!(message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length)) - message.supportedTargetResourceTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedTargetResourceTypes.push(reader.int32()); - } else - message.supportedTargetResourceTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControl message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControl message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControl.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.supportedEnforcementModes != null && message.hasOwnProperty("supportedEnforcementModes")) { - if (!Array.isArray(message.supportedEnforcementModes)) - return "supportedEnforcementModes: array expected"; - for (var i = 0; i < message.supportedEnforcementModes.length; ++i) - switch (message.supportedEnforcementModes[i]) { - default: - return "supportedEnforcementModes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.parameterSpec != null && message.hasOwnProperty("parameterSpec")) { - if (!Array.isArray(message.parameterSpec)) - return "parameterSpec: array expected"; - for (var i = 0; i < message.parameterSpec.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify(message.parameterSpec[i]); - if (error) - return "parameterSpec." + error; - } - } - 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.cloud.cloudsecuritycompliance.v1.Rule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) - if (!$util.isString(message.findingCategory)) - return "findingCategory: string expected"; - if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { - if (!Array.isArray(message.supportedCloudProviders)) - return "supportedCloudProviders: array expected"; - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - switch (message.supportedCloudProviders[i]) { - default: - return "supportedCloudProviders: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.relatedFrameworks != null && message.hasOwnProperty("relatedFrameworks")) { - if (!Array.isArray(message.relatedFrameworks)) - return "relatedFrameworks: array expected"; - for (var i = 0; i < message.relatedFrameworks.length; ++i) - if (!$util.isString(message.relatedFrameworks[i])) - return "relatedFrameworks: string[] expected"; - } - if (message.remediationSteps != null && message.hasOwnProperty("remediationSteps")) - if (!$util.isString(message.remediationSteps)) - return "remediationSteps: string expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) - switch (message.categories[i]) { - default: - return "categories: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - break; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.supportedTargetResourceTypes != null && message.hasOwnProperty("supportedTargetResourceTypes")) { - if (!Array.isArray(message.supportedTargetResourceTypes)) - return "supportedTargetResourceTypes: array expected"; - for (var i = 0; i < message.supportedTargetResourceTypes.length; ++i) - switch (message.supportedTargetResourceTypes[i]) { - default: - return "supportedTargetResourceTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - return null; - }; - - /** - * Creates a CloudControl message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControl} CloudControl - */ - CloudControl.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControl) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControl(); - if (object.name != null) - message.name = String(object.name); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.supportedEnforcementModes) { - if (!Array.isArray(object.supportedEnforcementModes)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.supportedEnforcementModes: array expected"); - message.supportedEnforcementModes = []; - for (var i = 0; i < object.supportedEnforcementModes.length; ++i) - switch (object.supportedEnforcementModes[i]) { - default: - if (typeof object.supportedEnforcementModes[i] === "number") { - message.supportedEnforcementModes[i] = object.supportedEnforcementModes[i]; - break; - } - case "ENFORCEMENT_MODE_UNSPECIFIED": - case 0: - message.supportedEnforcementModes[i] = 0; - break; - case "PREVENTIVE": - case 1: - message.supportedEnforcementModes[i] = 1; - break; - case "DETECTIVE": - case 2: - message.supportedEnforcementModes[i] = 2; - break; - case "AUDIT": - case 3: - message.supportedEnforcementModes[i] = 3; - break; - } - } - if (object.parameterSpec) { - if (!Array.isArray(object.parameterSpec)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.parameterSpec: array expected"); - message.parameterSpec = []; - for (var i = 0; i < object.parameterSpec.length; ++i) { - if (typeof object.parameterSpec[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.parameterSpec: object expected"); - message.parameterSpec[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.fromObject(object.parameterSpec[i]); - } - } - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.rules: object expected"); - message.rules[i] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.fromObject(object.rules[i]); - } - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "CRITICAL": - case 1: - message.severity = 1; - break; - case "HIGH": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "LOW": - case 4: - message.severity = 4; - break; - } - if (object.findingCategory != null) - message.findingCategory = String(object.findingCategory); - if (object.supportedCloudProviders) { - if (!Array.isArray(object.supportedCloudProviders)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.supportedCloudProviders: array expected"); - message.supportedCloudProviders = []; - for (var i = 0; i < object.supportedCloudProviders.length; ++i) - switch (object.supportedCloudProviders[i]) { - default: - if (typeof object.supportedCloudProviders[i] === "number") { - message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; - break; - } - case "CLOUD_PROVIDER_UNSPECIFIED": - case 0: - message.supportedCloudProviders[i] = 0; - break; - case "AWS": - case 1: - message.supportedCloudProviders[i] = 1; - break; - case "AZURE": - case 2: - message.supportedCloudProviders[i] = 2; - break; - case "GCP": - case 3: - message.supportedCloudProviders[i] = 3; - break; - } - } - if (object.relatedFrameworks) { - if (!Array.isArray(object.relatedFrameworks)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.relatedFrameworks: array expected"); - message.relatedFrameworks = []; - for (var i = 0; i < object.relatedFrameworks.length; ++i) - message.relatedFrameworks[i] = String(object.relatedFrameworks[i]); - } - if (object.remediationSteps != null) - message.remediationSteps = String(object.remediationSteps); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) - switch (object.categories[i]) { - default: - if (typeof object.categories[i] === "number") { - message.categories[i] = object.categories[i]; - break; - } - case "CLOUD_CONTROL_CATEGORY_UNSPECIFIED": - case 0: - message.categories[i] = 0; - break; - case "CC_CATEGORY_INFRASTRUCTURE": - case 1: - message.categories[i] = 1; - break; - case "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE": - case 2: - message.categories[i] = 2; - break; - case "CC_CATEGORY_PHYSICAL_SECURITY": - case 3: - message.categories[i] = 3; - break; - case "CC_CATEGORY_DATA_SECURITY": - case 4: - message.categories[i] = 4; - break; - case "CC_CATEGORY_NETWORK_SECURITY": - case 5: - message.categories[i] = 5; - break; - case "CC_CATEGORY_INCIDENT_MANAGEMENT": - case 6: - message.categories[i] = 6; - break; - case "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT": - case 7: - message.categories[i] = 7; - break; - case "CC_CATEGORY_ENCRYPTION": - case 8: - message.categories[i] = 8; - break; - case "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE": - case 9: - message.categories[i] = 9; - break; - case "CC_CATEGORY_HR_ADMIN_AND_PROCESSES": - case 10: - message.categories[i] = 10; - break; - case "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT": - case 11: - message.categories[i] = 11; - break; - case "CC_CATEGORY_LEGAL_AND_DISCLOSURES": - case 12: - message.categories[i] = 12; - break; - case "CC_CATEGORY_VULNERABILITY_MANAGEMENT": - case 13: - message.categories[i] = 13; - break; - case "CC_CATEGORY_PRIVACY": - case 14: - message.categories[i] = 14; - break; - case "CC_CATEGORY_BCDR": - case 15: - message.categories[i] = 15; - break; - case "CC_CATEGORY_ADMIN_ACCESS": - case 16: - message.categories[i] = 16; - break; - case "CC_CATEGORY_DATA_RESIDENCY": - case 17: - message.categories[i] = 17; - break; - case "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION": - case 18: - message.categories[i] = 18; - break; - case "CC_CATEGORY_SERVICE_SPECIFIC": - case 19: - message.categories[i] = 19; - break; - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.supportedTargetResourceTypes) { - if (!Array.isArray(object.supportedTargetResourceTypes)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControl.supportedTargetResourceTypes: array expected"); - message.supportedTargetResourceTypes = []; - for (var i = 0; i < object.supportedTargetResourceTypes.length; ++i) - switch (object.supportedTargetResourceTypes[i]) { - default: - if (typeof object.supportedTargetResourceTypes[i] === "number") { - message.supportedTargetResourceTypes[i] = object.supportedTargetResourceTypes[i]; - break; - } - case "TARGET_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.supportedTargetResourceTypes[i] = 0; - break; - case "TARGET_RESOURCE_CRM_TYPE_ORG": - case 1: - message.supportedTargetResourceTypes[i] = 1; - break; - case "TARGET_RESOURCE_CRM_TYPE_FOLDER": - case 2: - message.supportedTargetResourceTypes[i] = 2; - break; - case "TARGET_RESOURCE_CRM_TYPE_PROJECT": - case 3: - message.supportedTargetResourceTypes[i] = 3; - break; - case "TARGET_RESOURCE_TYPE_APPLICATION": - case 4: - message.supportedTargetResourceTypes[i] = 4; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CloudControl message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} message CloudControl - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControl.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.supportedEnforcementModes = []; - object.parameterSpec = []; - object.rules = []; - object.supportedCloudProviders = []; - object.relatedFrameworks = []; - object.categories = []; - object.supportedTargetResourceTypes = []; - } - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - object.description = ""; - object.displayName = ""; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.findingCategory = ""; - object.remediationSteps = ""; - object.createTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.supportedEnforcementModes && message.supportedEnforcementModes.length) { - object.supportedEnforcementModes = []; - for (var j = 0; j < message.supportedEnforcementModes.length; ++j) - object.supportedEnforcementModes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] === undefined ? message.supportedEnforcementModes[j] : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.supportedEnforcementModes[j]] : message.supportedEnforcementModes[j]; - } - if (message.parameterSpec && message.parameterSpec.length) { - object.parameterSpec = []; - for (var j = 0; j < message.parameterSpec.length; ++j) - object.parameterSpec[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.toObject(message.parameterSpec[j], options); - } - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.toObject(message.rules[j], options); - } - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] : message.severity; - if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) - object.findingCategory = message.findingCategory; - if (message.supportedCloudProviders && message.supportedCloudProviders.length) { - object.supportedCloudProviders = []; - for (var j = 0; j < message.supportedCloudProviders.length; ++j) - object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; - } - if (message.relatedFrameworks && message.relatedFrameworks.length) { - object.relatedFrameworks = []; - for (var j = 0; j < message.relatedFrameworks.length; ++j) - object.relatedFrameworks[j] = message.relatedFrameworks[j]; - } - if (message.remediationSteps != null && message.hasOwnProperty("remediationSteps")) - object.remediationSteps = message.remediationSteps; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[message.categories[j]] === undefined ? message.categories[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudControlCategory[message.categories[j]] : message.categories[j]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.supportedTargetResourceTypes && message.supportedTargetResourceTypes.length) { - object.supportedTargetResourceTypes = []; - for (var j = 0; j < message.supportedTargetResourceTypes.length; ++j) - object.supportedTargetResourceTypes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] === undefined ? message.supportedTargetResourceTypes[j] : $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceType[message.supportedTargetResourceTypes[j]] : message.supportedTargetResourceTypes[j]; - } - return object; - }; - - /** - * Converts this CloudControl to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @instance - * @returns {Object.} JSON object - */ - CloudControl.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControl - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControl - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControl"; - }; - - /** - * Type enum. - * @name google.cloud.cloudsecuritycompliance.v1.CloudControl.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CUSTOM=1 CUSTOM value - * @property {number} BUILT_IN=2 BUILT_IN value - */ - CloudControl.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CUSTOM"] = 1; - values[valuesById[2] = "BUILT_IN"] = 2; - return values; - })(); - - return CloudControl; - })(); - - v1.ParameterSpec = (function() { - - /** - * Properties of a ParameterSpec. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IParameterSpec - * @property {string|null} [name] ParameterSpec name - * @property {string|null} [displayName] ParameterSpec displayName - * @property {string|null} [description] ParameterSpec description - * @property {boolean|null} [isRequired] ParameterSpec isRequired - * @property {google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType|null} [valueType] ParameterSpec valueType - * @property {google.cloud.cloudsecuritycompliance.v1.IParamValue|null} [defaultValue] ParameterSpec defaultValue - * @property {Array.|null} [substitutionRules] ParameterSpec substitutionRules - * @property {Array.|null} [subParameters] ParameterSpec subParameters - * @property {google.cloud.cloudsecuritycompliance.v1.IValidation|null} [validation] ParameterSpec validation - */ - - /** - * Constructs a new ParameterSpec. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ParameterSpec. - * @implements IParameterSpec - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec=} [properties] Properties to set - */ - function ParameterSpec(properties) { - this.substitutionRules = []; - this.subParameters = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ParameterSpec name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.name = ""; - - /** - * ParameterSpec displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.displayName = ""; - - /** - * ParameterSpec description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.description = ""; - - /** - * ParameterSpec isRequired. - * @member {boolean} isRequired - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.isRequired = false; - - /** - * ParameterSpec valueType. - * @member {google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType} valueType - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.valueType = 0; - - /** - * ParameterSpec defaultValue. - * @member {google.cloud.cloudsecuritycompliance.v1.IParamValue|null|undefined} defaultValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.defaultValue = null; - - /** - * ParameterSpec substitutionRules. - * @member {Array.} substitutionRules - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.substitutionRules = $util.emptyArray; - - /** - * ParameterSpec subParameters. - * @member {Array.} subParameters - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.subParameters = $util.emptyArray; - - /** - * ParameterSpec validation. - * @member {google.cloud.cloudsecuritycompliance.v1.IValidation|null|undefined} validation - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - */ - ParameterSpec.prototype.validation = null; - - /** - * Creates a new ParameterSpec instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec instance - */ - ParameterSpec.create = function create(properties) { - return new ParameterSpec(properties); - }; - - /** - * Encodes the specified ParameterSpec message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec} message ParameterSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterSpec.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.isRequired != null && Object.hasOwnProperty.call(message, "isRequired")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isRequired); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.valueType); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.encode(message.defaultValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.substitutionRules != null && message.substitutionRules.length) - for (var i = 0; i < message.substitutionRules.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.encode(message.substitutionRules[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.subParameters != null && message.subParameters.length) - for (var i = 0; i < message.subParameters.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.encode(message.subParameters[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.validation != null && Object.hasOwnProperty.call(message, "validation")) - $root.google.cloud.cloudsecuritycompliance.v1.Validation.encode(message.validation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ParameterSpec message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSpec} message ParameterSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParameterSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterSpec.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.isRequired = reader.bool(); - break; - } - case 5: { - message.valueType = reader.int32(); - break; - } - case 6: { - message.defaultValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.substitutionRules && message.substitutionRules.length)) - message.substitutionRules = []; - message.substitutionRules.push($root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.subParameters && message.subParameters.length)) - message.subParameters = []; - message.subParameters.push($root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.decode(reader, reader.uint32())); - break; - } - case 9: { - message.validation = $root.google.cloud.cloudsecuritycompliance.v1.Validation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParameterSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParameterSpec message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParameterSpec.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.isRequired != null && message.hasOwnProperty("isRequired")) - if (typeof message.isRequired !== "boolean") - return "isRequired: boolean expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.verify(message.defaultValue); - if (error) - return "defaultValue." + error; - } - if (message.substitutionRules != null && message.hasOwnProperty("substitutionRules")) { - if (!Array.isArray(message.substitutionRules)) - return "substitutionRules: array expected"; - for (var i = 0; i < message.substitutionRules.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify(message.substitutionRules[i]); - if (error) - return "substitutionRules." + error; - } - } - if (message.subParameters != null && message.hasOwnProperty("subParameters")) { - if (!Array.isArray(message.subParameters)) - return "subParameters: array expected"; - for (var i = 0; i < message.subParameters.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.verify(message.subParameters[i]); - if (error) - return "subParameters." + error; - } - } - if (message.validation != null && message.hasOwnProperty("validation")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.Validation.verify(message.validation); - if (error) - return "validation." + error; - } - return null; - }; - - /** - * Creates a ParameterSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} ParameterSpec - */ - ParameterSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.isRequired != null) - message.isRequired = Boolean(object.isRequired); - switch (object.valueType) { - default: - if (typeof object.valueType === "number") { - message.valueType = object.valueType; - break; - } - break; - case "VALUE_TYPE_UNSPECIFIED": - case 0: - message.valueType = 0; - break; - case "STRING": - case 3: - message.valueType = 3; - break; - case "BOOLEAN": - case 4: - message.valueType = 4; - break; - case "STRINGLIST": - case 5: - message.valueType = 5; - break; - case "NUMBER": - case 6: - message.valueType = 6; - break; - case "ONEOF": - case 7: - message.valueType = 7; - break; - } - if (object.defaultValue != null) { - if (typeof object.defaultValue !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.defaultValue: object expected"); - message.defaultValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.fromObject(object.defaultValue); - } - if (object.substitutionRules) { - if (!Array.isArray(object.substitutionRules)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.substitutionRules: array expected"); - message.substitutionRules = []; - for (var i = 0; i < object.substitutionRules.length; ++i) { - if (typeof object.substitutionRules[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.substitutionRules: object expected"); - message.substitutionRules[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.fromObject(object.substitutionRules[i]); - } - } - if (object.subParameters) { - if (!Array.isArray(object.subParameters)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.subParameters: array expected"); - message.subParameters = []; - for (var i = 0; i < object.subParameters.length; ++i) { - if (typeof object.subParameters[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.subParameters: object expected"); - message.subParameters[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.fromObject(object.subParameters[i]); - } - } - if (object.validation != null) { - if (typeof object.validation !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSpec.validation: object expected"); - message.validation = $root.google.cloud.cloudsecuritycompliance.v1.Validation.fromObject(object.validation); - } - return message; - }; - - /** - * Creates a plain object from a ParameterSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ParameterSpec} message ParameterSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParameterSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.substitutionRules = []; - object.subParameters = []; - } - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.isRequired = false; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.defaultValue = null; - object.validation = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.isRequired != null && message.hasOwnProperty("isRequired")) - object.isRequired = message.isRequired; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType[message.valueType] === undefined ? message.valueType : $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType[message.valueType] : message.valueType; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.toObject(message.defaultValue, options); - if (message.substitutionRules && message.substitutionRules.length) { - object.substitutionRules = []; - for (var j = 0; j < message.substitutionRules.length; ++j) - object.substitutionRules[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.toObject(message.substitutionRules[j], options); - } - if (message.subParameters && message.subParameters.length) { - object.subParameters = []; - for (var j = 0; j < message.subParameters.length; ++j) - object.subParameters[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.toObject(message.subParameters[j], options); - } - if (message.validation != null && message.hasOwnProperty("validation")) - object.validation = $root.google.cloud.cloudsecuritycompliance.v1.Validation.toObject(message.validation, options); - return object; - }; - - /** - * Converts this ParameterSpec to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @instance - * @returns {Object.} JSON object - */ - ParameterSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ParameterSpec - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParameterSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ParameterSpec"; - }; - - /** - * ValueType enum. - * @name google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType - * @enum {number} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} STRING=3 STRING value - * @property {number} BOOLEAN=4 BOOLEAN value - * @property {number} STRINGLIST=5 STRINGLIST value - * @property {number} NUMBER=6 NUMBER value - * @property {number} ONEOF=7 ONEOF value - */ - ParameterSpec.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[3] = "STRING"] = 3; - values[valuesById[4] = "BOOLEAN"] = 4; - values[valuesById[5] = "STRINGLIST"] = 5; - values[valuesById[6] = "NUMBER"] = 6; - values[valuesById[7] = "ONEOF"] = 7; - return values; - })(); - - return ParameterSpec; - })(); - - v1.Validation = (function() { - - /** - * Properties of a Validation. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IValidation - * @property {google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null} [allowedValues] Validation allowedValues - * @property {google.cloud.cloudsecuritycompliance.v1.IIntRange|null} [intRange] Validation intRange - * @property {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null} [regexpPattern] Validation regexpPattern - */ - - /** - * Constructs a new Validation. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Validation. - * @implements IValidation - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IValidation=} [properties] Properties to set - */ - function Validation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Validation allowedValues. - * @member {google.cloud.cloudsecuritycompliance.v1.IAllowedValues|null|undefined} allowedValues - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @instance - */ - Validation.prototype.allowedValues = null; - - /** - * Validation intRange. - * @member {google.cloud.cloudsecuritycompliance.v1.IIntRange|null|undefined} intRange - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @instance - */ - Validation.prototype.intRange = null; - - /** - * Validation regexpPattern. - * @member {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern|null|undefined} regexpPattern - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @instance - */ - Validation.prototype.regexpPattern = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Validation constraint. - * @member {"allowedValues"|"intRange"|"regexpPattern"|undefined} constraint - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @instance - */ - Object.defineProperty(Validation.prototype, "constraint", { - get: $util.oneOfGetter($oneOfFields = ["allowedValues", "intRange", "regexpPattern"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Validation instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IValidation=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation instance - */ - Validation.create = function create(properties) { - return new Validation(properties); - }; - - /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IValidation} message Validation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowedValues != null && Object.hasOwnProperty.call(message, "allowedValues")) - $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.encode(message.allowedValues, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.intRange != null && Object.hasOwnProperty.call(message, "intRange")) - $root.google.cloud.cloudsecuritycompliance.v1.IntRange.encode(message.intRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.regexpPattern != null && Object.hasOwnProperty.call(message, "regexpPattern")) - $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.encode(message.regexpPattern, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Validation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IValidation} message Validation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Validation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Validation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.allowedValues = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.decode(reader, reader.uint32()); - break; - } - case 2: { - message.intRange = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.decode(reader, reader.uint32()); - break; - } - case 3: { - message.regexpPattern = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Validation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Validation message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Validation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { - properties.constraint = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify(message.allowedValues); - if (error) - return "allowedValues." + error; - } - } - if (message.intRange != null && message.hasOwnProperty("intRange")) { - if (properties.constraint === 1) - return "constraint: multiple values"; - properties.constraint = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.verify(message.intRange); - if (error) - return "intRange." + error; - } - } - if (message.regexpPattern != null && message.hasOwnProperty("regexpPattern")) { - if (properties.constraint === 1) - return "constraint: multiple values"; - properties.constraint = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify(message.regexpPattern); - if (error) - return "regexpPattern." + error; - } - } - return null; - }; - - /** - * Creates a Validation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.Validation} Validation - */ - Validation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Validation) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.Validation(); - if (object.allowedValues != null) { - if (typeof object.allowedValues !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Validation.allowedValues: object expected"); - message.allowedValues = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.fromObject(object.allowedValues); - } - if (object.intRange != null) { - if (typeof object.intRange !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Validation.intRange: object expected"); - message.intRange = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.fromObject(object.intRange); - } - if (object.regexpPattern != null) { - if (typeof object.regexpPattern !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Validation.regexpPattern: object expected"); - message.regexpPattern = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.fromObject(object.regexpPattern); - } - return message; - }; - - /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.Validation} message Validation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Validation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { - object.allowedValues = $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues.toObject(message.allowedValues, options); - if (options.oneofs) - object.constraint = "allowedValues"; - } - if (message.intRange != null && message.hasOwnProperty("intRange")) { - object.intRange = $root.google.cloud.cloudsecuritycompliance.v1.IntRange.toObject(message.intRange, options); - if (options.oneofs) - object.constraint = "intRange"; - } - if (message.regexpPattern != null && message.hasOwnProperty("regexpPattern")) { - object.regexpPattern = $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern.toObject(message.regexpPattern, options); - if (options.oneofs) - object.constraint = "regexpPattern"; - } - return object; - }; - - /** - * Converts this Validation to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @instance - * @returns {Object.} JSON object - */ - Validation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Validation - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.Validation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Validation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Validation"; - }; - - return Validation; - })(); - - v1.AllowedValues = (function() { - - /** - * Properties of an AllowedValues. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IAllowedValues - * @property {Array.|null} [values] AllowedValues values - */ - - /** - * Constructs a new AllowedValues. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an AllowedValues. - * @implements IAllowedValues - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues=} [properties] Properties to set - */ - function AllowedValues(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AllowedValues values. - * @member {Array.} values - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @instance - */ - AllowedValues.prototype.values = $util.emptyArray; - - /** - * Creates a new AllowedValues instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues instance - */ - AllowedValues.create = function create(properties) { - return new AllowedValues(properties); - }; - - /** - * Encodes the specified AllowedValues message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues} message AllowedValues message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllowedValues.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AllowedValues message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AllowedValues.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAllowedValues} message AllowedValues message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllowedValues.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllowedValues message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllowedValues.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.cloud.cloudsecuritycompliance.v1.ParamValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllowedValues message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllowedValues.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllowedValues message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllowedValues.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - - /** - * Creates an AllowedValues message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.AllowedValues} AllowedValues - */ - AllowedValues.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.AllowedValues(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AllowedValues.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AllowedValues.values: object expected"); - message.values[i] = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.fromObject(object.values[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AllowedValues message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AllowedValues} message AllowedValues - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllowedValues.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.cloud.cloudsecuritycompliance.v1.ParamValue.toObject(message.values[j], options); - } - return object; - }; - - /** - * Converts this AllowedValues to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @instance - * @returns {Object.} JSON object - */ - AllowedValues.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllowedValues - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.AllowedValues - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllowedValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AllowedValues"; - }; - - return AllowedValues; - })(); - - v1.RegexpPattern = (function() { - - /** - * Properties of a RegexpPattern. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IRegexpPattern - * @property {string|null} [pattern] RegexpPattern pattern - */ - - /** - * Constructs a new RegexpPattern. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a RegexpPattern. - * @implements IRegexpPattern - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern=} [properties] Properties to set - */ - function RegexpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegexpPattern pattern. - * @member {string} pattern - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @instance - */ - RegexpPattern.prototype.pattern = ""; - - /** - * Creates a new RegexpPattern instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern instance - */ - RegexpPattern.create = function create(properties) { - return new RegexpPattern(properties); - }; - - /** - * Encodes the specified RegexpPattern message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern} message RegexpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegexpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pattern); - return writer; - }; - - /** - * Encodes the specified RegexpPattern message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.RegexpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IRegexpPattern} message RegexpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegexpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegexpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegexpPattern.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.pattern = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegexpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegexpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegexpPattern message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegexpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) - if (!$util.isString(message.pattern)) - return "pattern: string expected"; - return null; - }; - - /** - * Creates a RegexpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} RegexpPattern - */ - RegexpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.RegexpPattern(); - if (object.pattern != null) - message.pattern = String(object.pattern); - return message; - }; - - /** - * Creates a plain object from a RegexpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.RegexpPattern} message RegexpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegexpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pattern = ""; - if (message.pattern != null && message.hasOwnProperty("pattern")) - object.pattern = message.pattern; - return object; - }; - - /** - * Converts this RegexpPattern to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @instance - * @returns {Object.} JSON object - */ - RegexpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RegexpPattern - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.RegexpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RegexpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.RegexpPattern"; - }; - - return RegexpPattern; - })(); - - v1.IntRange = (function() { - - /** - * Properties of an IntRange. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IIntRange - * @property {number|Long|null} [min] IntRange min - * @property {number|Long|null} [max] IntRange max - */ - - /** - * Constructs a new IntRange. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an IntRange. - * @implements IIntRange - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange=} [properties] Properties to set - */ - function IntRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntRange min. - * @member {number|Long} min - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @instance - */ - IntRange.prototype.min = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * IntRange max. - * @member {number|Long} max - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @instance - */ - IntRange.prototype.max = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new IntRange instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange instance - */ - IntRange.create = function create(properties) { - return new IntRange(properties); - }; - - /** - * Encodes the specified IntRange message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange} message IntRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.max); - return writer; - }; - - /** - * Encodes the specified IntRange message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.IntRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IIntRange} message IntRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IntRange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.IntRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.min = reader.int64(); - break; - } - case 2: { - message.max = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IntRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IntRange message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (!$util.isInteger(message.min) && !(message.min && $util.isInteger(message.min.low) && $util.isInteger(message.min.high))) - return "min: integer|Long expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (!$util.isInteger(message.max) && !(message.max && $util.isInteger(message.max.low) && $util.isInteger(message.max.high))) - return "max: integer|Long expected"; - return null; - }; - - /** - * Creates an IntRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.IntRange} IntRange - */ - IntRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.IntRange) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.IntRange(); - if (object.min != null) - if ($util.Long) - (message.min = $util.Long.fromValue(object.min)).unsigned = false; - else if (typeof object.min === "string") - message.min = parseInt(object.min, 10); - else if (typeof object.min === "number") - message.min = object.min; - else if (typeof object.min === "object") - message.min = new $util.LongBits(object.min.low >>> 0, object.min.high >>> 0).toNumber(); - if (object.max != null) - if ($util.Long) - (message.max = $util.Long.fromValue(object.max)).unsigned = false; - else if (typeof object.max === "string") - message.max = parseInt(object.max, 10); - else if (typeof object.max === "number") - message.max = object.max; - else if (typeof object.max === "object") - message.max = new $util.LongBits(object.max.low >>> 0, object.max.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an IntRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IntRange} message IntRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntRange.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.min = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.min = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max = options.longs === String ? "0" : 0; - } - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min === "number") - object.min = options.longs === String ? String(message.min) : message.min; - else - object.min = options.longs === String ? $util.Long.prototype.toString.call(message.min) : options.longs === Number ? new $util.LongBits(message.min.low >>> 0, message.min.high >>> 0).toNumber() : message.min; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max === "number") - object.max = options.longs === String ? String(message.max) : message.max; - else - object.max = options.longs === String ? $util.Long.prototype.toString.call(message.max) : options.longs === Number ? new $util.LongBits(message.max.low >>> 0, message.max.high >>> 0).toNumber() : message.max; - return object; - }; - - /** - * Converts this IntRange to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @instance - * @returns {Object.} JSON object - */ - IntRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IntRange - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.IntRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.IntRange"; - }; - - return IntRange; - })(); - - v1.StringList = (function() { - - /** - * Properties of a StringList. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IStringList - * @property {Array.|null} [values] StringList values - */ - - /** - * Constructs a new StringList. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a StringList. - * @implements IStringList - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IStringList=} [properties] Properties to set - */ - function StringList(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringList values. - * @member {Array.} values - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @instance - */ - StringList.prototype.values = $util.emptyArray; - - /** - * Creates a new StringList instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IStringList=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList instance - */ - StringList.create = function create(properties) { - return new StringList(properties); - }; - - /** - * Encodes the specified StringList message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IStringList} message StringList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified StringList message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.StringList.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IStringList} message StringList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringList message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringList.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.StringList(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringList message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a StringList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.StringList} StringList - */ - StringList.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.StringList) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.StringList(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.StringList.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a StringList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.StringList} message StringList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this StringList to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @instance - * @returns {Object.} JSON object - */ - StringList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringList - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.StringList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.StringList"; - }; - - return StringList; - })(); - - v1.ParamValue = (function() { - - /** - * Properties of a ParamValue. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IParamValue - * @property {string|null} [stringValue] ParamValue stringValue - * @property {boolean|null} [boolValue] ParamValue boolValue - * @property {google.cloud.cloudsecuritycompliance.v1.IStringList|null} [stringListValue] ParamValue stringListValue - * @property {number|null} [numberValue] ParamValue numberValue - * @property {google.cloud.cloudsecuritycompliance.v1.IParameter|null} [oneofValue] ParamValue oneofValue - */ - - /** - * Constructs a new ParamValue. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ParamValue. - * @implements IParamValue - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue=} [properties] Properties to set - */ - function ParamValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ParamValue stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @instance - */ - ParamValue.prototype.stringValue = null; - - /** - * ParamValue boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @instance - */ - ParamValue.prototype.boolValue = null; - - /** - * ParamValue stringListValue. - * @member {google.cloud.cloudsecuritycompliance.v1.IStringList|null|undefined} stringListValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @instance - */ - ParamValue.prototype.stringListValue = null; - - /** - * ParamValue numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @instance - */ - ParamValue.prototype.numberValue = null; - - /** - * ParamValue oneofValue. - * @member {google.cloud.cloudsecuritycompliance.v1.IParameter|null|undefined} oneofValue - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @instance - */ - ParamValue.prototype.oneofValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ParamValue kind. - * @member {"stringValue"|"boolValue"|"stringListValue"|"numberValue"|"oneofValue"|undefined} kind - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @instance - */ - Object.defineProperty(ParamValue.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["stringValue", "boolValue", "stringListValue", "numberValue", "oneofValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ParamValue instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue instance - */ - ParamValue.create = function create(properties) { - return new ParamValue(properties); - }; - - /** - * Encodes the specified ParamValue message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue} message ParamValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParamValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.stringListValue != null && Object.hasOwnProperty.call(message, "stringListValue")) - $root.google.cloud.cloudsecuritycompliance.v1.StringList.encode(message.stringListValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.numberValue); - if (message.oneofValue != null && Object.hasOwnProperty.call(message, "oneofValue")) - $root.google.cloud.cloudsecuritycompliance.v1.Parameter.encode(message.oneofValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ParamValue message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParamValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParamValue} message ParamValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParamValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParamValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParamValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ParamValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.stringListValue = $root.google.cloud.cloudsecuritycompliance.v1.StringList.decode(reader, reader.uint32()); - break; - } - case 6: { - message.numberValue = reader.double(); - break; - } - case 7: { - message.oneofValue = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParamValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParamValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParamValue message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParamValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.StringList.verify(message.stringListValue); - if (error) - return "stringListValue." + error; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.oneofValue != null && message.hasOwnProperty("oneofValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.verify(message.oneofValue); - if (error) - return "oneofValue." + error; - } - } - return null; - }; - - /** - * Creates a ParamValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ParamValue} ParamValue - */ - ParamValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ParamValue) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ParamValue(); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.stringListValue != null) { - if (typeof object.stringListValue !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParamValue.stringListValue: object expected"); - message.stringListValue = $root.google.cloud.cloudsecuritycompliance.v1.StringList.fromObject(object.stringListValue); - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.oneofValue != null) { - if (typeof object.oneofValue !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParamValue.oneofValue: object expected"); - message.oneofValue = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.fromObject(object.oneofValue); - } - return message; - }; - - /** - * Creates a plain object from a ParamValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ParamValue} message ParamValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParamValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.stringListValue != null && message.hasOwnProperty("stringListValue")) { - object.stringListValue = $root.google.cloud.cloudsecuritycompliance.v1.StringList.toObject(message.stringListValue, options); - if (options.oneofs) - object.kind = "stringListValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.oneofValue != null && message.hasOwnProperty("oneofValue")) { - object.oneofValue = $root.google.cloud.cloudsecuritycompliance.v1.Parameter.toObject(message.oneofValue, options); - if (options.oneofs) - object.kind = "oneofValue"; - } - return object; - }; - - /** - * Converts this ParamValue to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @instance - * @returns {Object.} JSON object - */ - ParamValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ParamValue - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ParamValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParamValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ParamValue"; - }; - - return ParamValue; - })(); - - v1.ParameterSubstitutionRule = (function() { - - /** - * Properties of a ParameterSubstitutionRule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IParameterSubstitutionRule - * @property {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null} [placeholderSubstitutionRule] ParameterSubstitutionRule placeholderSubstitutionRule - * @property {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null} [attributeSubstitutionRule] ParameterSubstitutionRule attributeSubstitutionRule - */ - - /** - * Constructs a new ParameterSubstitutionRule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ParameterSubstitutionRule. - * @implements IParameterSubstitutionRule - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule=} [properties] Properties to set - */ - function ParameterSubstitutionRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ParameterSubstitutionRule placeholderSubstitutionRule. - * @member {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule|null|undefined} placeholderSubstitutionRule - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @instance - */ - ParameterSubstitutionRule.prototype.placeholderSubstitutionRule = null; - - /** - * ParameterSubstitutionRule attributeSubstitutionRule. - * @member {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule|null|undefined} attributeSubstitutionRule - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @instance - */ - ParameterSubstitutionRule.prototype.attributeSubstitutionRule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ParameterSubstitutionRule substitutionType. - * @member {"placeholderSubstitutionRule"|"attributeSubstitutionRule"|undefined} substitutionType - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @instance - */ - Object.defineProperty(ParameterSubstitutionRule.prototype, "substitutionType", { - get: $util.oneOfGetter($oneOfFields = ["placeholderSubstitutionRule", "attributeSubstitutionRule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ParameterSubstitutionRule instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule instance - */ - ParameterSubstitutionRule.create = function create(properties) { - return new ParameterSubstitutionRule(properties); - }; - - /** - * Encodes the specified ParameterSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule} message ParameterSubstitutionRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterSubstitutionRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.placeholderSubstitutionRule != null && Object.hasOwnProperty.call(message, "placeholderSubstitutionRule")) - $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.encode(message.placeholderSubstitutionRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.attributeSubstitutionRule != null && Object.hasOwnProperty.call(message, "attributeSubstitutionRule")) - $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.encode(message.attributeSubstitutionRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ParameterSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IParameterSubstitutionRule} message ParameterSubstitutionRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterSubstitutionRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParameterSubstitutionRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterSubstitutionRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.placeholderSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.decode(reader, reader.uint32()); - break; - } - case 2: { - message.attributeSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParameterSubstitutionRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterSubstitutionRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParameterSubstitutionRule message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParameterSubstitutionRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.placeholderSubstitutionRule != null && message.hasOwnProperty("placeholderSubstitutionRule")) { - properties.substitutionType = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify(message.placeholderSubstitutionRule); - if (error) - return "placeholderSubstitutionRule." + error; - } - } - if (message.attributeSubstitutionRule != null && message.hasOwnProperty("attributeSubstitutionRule")) { - if (properties.substitutionType === 1) - return "substitutionType: multiple values"; - properties.substitutionType = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify(message.attributeSubstitutionRule); - if (error) - return "attributeSubstitutionRule." + error; - } - } - return null; - }; - - /** - * Creates a ParameterSubstitutionRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} ParameterSubstitutionRule - */ - ParameterSubstitutionRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule(); - if (object.placeholderSubstitutionRule != null) { - if (typeof object.placeholderSubstitutionRule !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.placeholderSubstitutionRule: object expected"); - message.placeholderSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.fromObject(object.placeholderSubstitutionRule); - } - if (object.attributeSubstitutionRule != null) { - if (typeof object.attributeSubstitutionRule !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule.attributeSubstitutionRule: object expected"); - message.attributeSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.fromObject(object.attributeSubstitutionRule); - } - return message; - }; - - /** - * Creates a plain object from a ParameterSubstitutionRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule} message ParameterSubstitutionRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParameterSubstitutionRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.placeholderSubstitutionRule != null && message.hasOwnProperty("placeholderSubstitutionRule")) { - object.placeholderSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.toObject(message.placeholderSubstitutionRule, options); - if (options.oneofs) - object.substitutionType = "placeholderSubstitutionRule"; - } - if (message.attributeSubstitutionRule != null && message.hasOwnProperty("attributeSubstitutionRule")) { - object.attributeSubstitutionRule = $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.toObject(message.attributeSubstitutionRule, options); - if (options.oneofs) - object.substitutionType = "attributeSubstitutionRule"; - } - return object; - }; - - /** - * Converts this ParameterSubstitutionRule to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @instance - * @returns {Object.} JSON object - */ - ParameterSubstitutionRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ParameterSubstitutionRule - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParameterSubstitutionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule"; - }; - - return ParameterSubstitutionRule; - })(); - - v1.AttributeSubstitutionRule = (function() { - - /** - * Properties of an AttributeSubstitutionRule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IAttributeSubstitutionRule - * @property {string|null} [attribute] AttributeSubstitutionRule attribute - */ - - /** - * Constructs a new AttributeSubstitutionRule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an AttributeSubstitutionRule. - * @implements IAttributeSubstitutionRule - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule=} [properties] Properties to set - */ - function AttributeSubstitutionRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AttributeSubstitutionRule attribute. - * @member {string} attribute - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @instance - */ - AttributeSubstitutionRule.prototype.attribute = ""; - - /** - * Creates a new AttributeSubstitutionRule instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule instance - */ - AttributeSubstitutionRule.create = function create(properties) { - return new AttributeSubstitutionRule(properties); - }; - - /** - * Encodes the specified AttributeSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule} message AttributeSubstitutionRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttributeSubstitutionRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.attribute); - return writer; - }; - - /** - * Encodes the specified AttributeSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAttributeSubstitutionRule} message AttributeSubstitutionRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttributeSubstitutionRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AttributeSubstitutionRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttributeSubstitutionRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.attribute = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AttributeSubstitutionRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttributeSubstitutionRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AttributeSubstitutionRule message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AttributeSubstitutionRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) - if (!$util.isString(message.attribute)) - return "attribute: string expected"; - return null; - }; - - /** - * Creates an AttributeSubstitutionRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} AttributeSubstitutionRule - */ - AttributeSubstitutionRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule(); - if (object.attribute != null) - message.attribute = String(object.attribute); - return message; - }; - - /** - * Creates a plain object from an AttributeSubstitutionRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule} message AttributeSubstitutionRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AttributeSubstitutionRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.attribute = ""; - if (message.attribute != null && message.hasOwnProperty("attribute")) - object.attribute = message.attribute; - return object; - }; - - /** - * Converts this AttributeSubstitutionRule to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @instance - * @returns {Object.} JSON object - */ - AttributeSubstitutionRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AttributeSubstitutionRule - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AttributeSubstitutionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule"; - }; - - return AttributeSubstitutionRule; - })(); - - v1.PlaceholderSubstitutionRule = (function() { - - /** - * Properties of a PlaceholderSubstitutionRule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IPlaceholderSubstitutionRule - * @property {string|null} [attribute] PlaceholderSubstitutionRule attribute - */ - - /** - * Constructs a new PlaceholderSubstitutionRule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a PlaceholderSubstitutionRule. - * @implements IPlaceholderSubstitutionRule - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule=} [properties] Properties to set - */ - function PlaceholderSubstitutionRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlaceholderSubstitutionRule attribute. - * @member {string} attribute - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @instance - */ - PlaceholderSubstitutionRule.prototype.attribute = ""; - - /** - * Creates a new PlaceholderSubstitutionRule instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule instance - */ - PlaceholderSubstitutionRule.create = function create(properties) { - return new PlaceholderSubstitutionRule(properties); - }; - - /** - * Encodes the specified PlaceholderSubstitutionRule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule} message PlaceholderSubstitutionRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlaceholderSubstitutionRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.attribute); - return writer; - }; - - /** - * Encodes the specified PlaceholderSubstitutionRule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IPlaceholderSubstitutionRule} message PlaceholderSubstitutionRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlaceholderSubstitutionRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlaceholderSubstitutionRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.attribute = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PlaceholderSubstitutionRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlaceholderSubstitutionRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlaceholderSubstitutionRule message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlaceholderSubstitutionRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) - if (!$util.isString(message.attribute)) - return "attribute: string expected"; - return null; - }; - - /** - * Creates a PlaceholderSubstitutionRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} PlaceholderSubstitutionRule - */ - PlaceholderSubstitutionRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule(); - if (object.attribute != null) - message.attribute = String(object.attribute); - return message; - }; - - /** - * Creates a plain object from a PlaceholderSubstitutionRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule} message PlaceholderSubstitutionRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlaceholderSubstitutionRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.attribute = ""; - if (message.attribute != null && message.hasOwnProperty("attribute")) - object.attribute = message.attribute; - return object; - }; - - /** - * Converts this PlaceholderSubstitutionRule to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @instance - * @returns {Object.} JSON object - */ - PlaceholderSubstitutionRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PlaceholderSubstitutionRule - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlaceholderSubstitutionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule"; - }; - - return PlaceholderSubstitutionRule; - })(); - - v1.Rule = (function() { - - /** - * Properties of a Rule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IRule - * @property {google.cloud.cloudsecuritycompliance.v1.ICELExpression|null} [celExpression] Rule celExpression - * @property {string|null} [description] Rule description - * @property {Array.|null} [ruleActionTypes] Rule ruleActionTypes - */ - - /** - * Constructs a new Rule. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Rule. - * @implements IRule - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IRule=} [properties] Properties to set - */ - function Rule(properties) { - this.ruleActionTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Rule celExpression. - * @member {google.cloud.cloudsecuritycompliance.v1.ICELExpression|null|undefined} celExpression - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @instance - */ - Rule.prototype.celExpression = null; - - /** - * Rule description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @instance - */ - Rule.prototype.description = ""; - - /** - * Rule ruleActionTypes. - * @member {Array.} ruleActionTypes - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @instance - */ - Rule.prototype.ruleActionTypes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Rule implementation. - * @member {"celExpression"|undefined} implementation - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @instance - */ - Object.defineProperty(Rule.prototype, "implementation", { - get: $util.oneOfGetter($oneOfFields = ["celExpression"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Rule instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IRule=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule instance - */ - Rule.create = function create(properties) { - return new Rule(properties); - }; - - /** - * Encodes the specified Rule message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.celExpression != null && Object.hasOwnProperty.call(message, "celExpression")) - $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.encode(message.celExpression, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.description); - if (message.ruleActionTypes != null && message.ruleActionTypes.length) { - writer.uint32(/* id 16, wireType 2 =*/130).fork(); - for (var i = 0; i < message.ruleActionTypes.length; ++i) - writer.int32(message.ruleActionTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Rule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Rule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Rule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.celExpression = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.decode(reader, reader.uint32()); - break; - } - case 10: { - message.description = reader.string(); - break; - } - case 16: { - if (!(message.ruleActionTypes && message.ruleActionTypes.length)) - message.ruleActionTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ruleActionTypes.push(reader.int32()); - } else - message.ruleActionTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Rule message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Rule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.celExpression != null && message.hasOwnProperty("celExpression")) { - properties.implementation = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.verify(message.celExpression); - if (error) - return "celExpression." + error; - } - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.ruleActionTypes != null && message.hasOwnProperty("ruleActionTypes")) { - if (!Array.isArray(message.ruleActionTypes)) - return "ruleActionTypes: array expected"; - for (var i = 0; i < message.ruleActionTypes.length; ++i) - switch (message.ruleActionTypes[i]) { - default: - return "ruleActionTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.Rule} Rule - */ - Rule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Rule) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.Rule(); - if (object.celExpression != null) { - if (typeof object.celExpression !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Rule.celExpression: object expected"); - message.celExpression = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.fromObject(object.celExpression); - } - if (object.description != null) - message.description = String(object.description); - if (object.ruleActionTypes) { - if (!Array.isArray(object.ruleActionTypes)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Rule.ruleActionTypes: array expected"); - message.ruleActionTypes = []; - for (var i = 0; i < object.ruleActionTypes.length; ++i) - switch (object.ruleActionTypes[i]) { - default: - if (typeof object.ruleActionTypes[i] === "number") { - message.ruleActionTypes[i] = object.ruleActionTypes[i]; - break; - } - case "RULE_ACTION_TYPE_UNSPECIFIED": - case 0: - message.ruleActionTypes[i] = 0; - break; - case "RULE_ACTION_TYPE_PREVENTIVE": - case 1: - message.ruleActionTypes[i] = 1; - break; - case "RULE_ACTION_TYPE_DETECTIVE": - case 2: - message.ruleActionTypes[i] = 2; - break; - case "RULE_ACTION_TYPE_AUDIT": - case 3: - message.ruleActionTypes[i] = 3; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.Rule} message Rule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Rule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ruleActionTypes = []; - if (options.defaults) - object.description = ""; - if (message.celExpression != null && message.hasOwnProperty("celExpression")) { - object.celExpression = $root.google.cloud.cloudsecuritycompliance.v1.CELExpression.toObject(message.celExpression, options); - if (options.oneofs) - object.implementation = "celExpression"; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.ruleActionTypes && message.ruleActionTypes.length) { - object.ruleActionTypes = []; - for (var j = 0; j < message.ruleActionTypes.length; ++j) - object.ruleActionTypes[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.RuleActionType[message.ruleActionTypes[j]] === undefined ? message.ruleActionTypes[j] : $root.google.cloud.cloudsecuritycompliance.v1.RuleActionType[message.ruleActionTypes[j]] : message.ruleActionTypes[j]; - } - return object; - }; - - /** - * Converts this Rule to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @instance - * @returns {Object.} JSON object - */ - Rule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Rule - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.Rule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Rule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Rule"; - }; - - return Rule; - })(); - - v1.CELExpression = (function() { - - /** - * Properties of a CELExpression. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICELExpression - * @property {google.cloud.cloudsecuritycompliance.v1.IStringList|null} [resourceTypesValues] CELExpression resourceTypesValues - * @property {string|null} [expression] CELExpression expression - */ - - /** - * Constructs a new CELExpression. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CELExpression. - * @implements ICELExpression - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression=} [properties] Properties to set - */ - function CELExpression(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CELExpression resourceTypesValues. - * @member {google.cloud.cloudsecuritycompliance.v1.IStringList|null|undefined} resourceTypesValues - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @instance - */ - CELExpression.prototype.resourceTypesValues = null; - - /** - * CELExpression expression. - * @member {string} expression - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @instance - */ - CELExpression.prototype.expression = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CELExpression criteria. - * @member {"resourceTypesValues"|undefined} criteria - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @instance - */ - Object.defineProperty(CELExpression.prototype, "criteria", { - get: $util.oneOfGetter($oneOfFields = ["resourceTypesValues"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CELExpression instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression instance - */ - CELExpression.create = function create(properties) { - return new CELExpression(properties); - }; - - /** - * Encodes the specified CELExpression message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression} message CELExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CELExpression.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.resourceTypesValues != null && Object.hasOwnProperty.call(message, "resourceTypesValues")) - $root.google.cloud.cloudsecuritycompliance.v1.StringList.encode(message.resourceTypesValues, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CELExpression message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CELExpression.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICELExpression} message CELExpression message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CELExpression.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CELExpression message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CELExpression.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CELExpression(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.resourceTypesValues = $root.google.cloud.cloudsecuritycompliance.v1.StringList.decode(reader, reader.uint32()); - break; - } - case 1: { - message.expression = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CELExpression message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CELExpression.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CELExpression message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CELExpression.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.resourceTypesValues != null && message.hasOwnProperty("resourceTypesValues")) { - properties.criteria = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.StringList.verify(message.resourceTypesValues); - if (error) - return "resourceTypesValues." + error; - } - } - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - return null; - }; - - /** - * Creates a CELExpression message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CELExpression} CELExpression - */ - CELExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CELExpression) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CELExpression(); - if (object.resourceTypesValues != null) { - if (typeof object.resourceTypesValues !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CELExpression.resourceTypesValues: object expected"); - message.resourceTypesValues = $root.google.cloud.cloudsecuritycompliance.v1.StringList.fromObject(object.resourceTypesValues); - } - if (object.expression != null) - message.expression = String(object.expression); - return message; - }; - - /** - * Creates a plain object from a CELExpression message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CELExpression} message CELExpression - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CELExpression.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.expression = ""; - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.resourceTypesValues != null && message.hasOwnProperty("resourceTypesValues")) { - object.resourceTypesValues = $root.google.cloud.cloudsecuritycompliance.v1.StringList.toObject(message.resourceTypesValues, options); - if (options.oneofs) - object.criteria = "resourceTypesValues"; - } - return object; - }; - - /** - * Converts this CELExpression to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @instance - * @returns {Object.} JSON object - */ - CELExpression.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CELExpression - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CELExpression - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CELExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CELExpression"; - }; - - return CELExpression; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.OperationMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.cloudsecuritycompliance.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.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.cloudsecuritycompliance.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.Control = (function() { - - /** - * Properties of a Control. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IControl - * @property {string|null} [name] Control name - * @property {string|null} [displayName] Control displayName - * @property {string|null} [description] Control description - * @property {google.cloud.cloudsecuritycompliance.v1.Control.Family|null} [family] Control family - * @property {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null} [controlFamily] Control controlFamily - * @property {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null} [responsibilityType] Control responsibilityType - * @property {string|null} [googleResponsibilityDescription] Control googleResponsibilityDescription - * @property {string|null} [googleResponsibilityImplementation] Control googleResponsibilityImplementation - * @property {string|null} [customerResponsibilityDescription] Control customerResponsibilityDescription - * @property {string|null} [customerResponsibilityImplementation] Control customerResponsibilityImplementation - * @property {string|null} [sharedResponsibilityDescription] Control sharedResponsibilityDescription - * @property {string|null} [additionalContentUri] Control additionalContentUri - * @property {Array.|null} [relatedFrameworks] Control relatedFrameworks - */ - - /** - * Constructs a new Control. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Control. - * @implements IControl - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IControl=} [properties] Properties to set - */ - function Control(properties) { - this.relatedFrameworks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Control name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.name = ""; - - /** - * Control displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.displayName = ""; - - /** - * Control description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.description = ""; - - /** - * Control family. - * @member {google.cloud.cloudsecuritycompliance.v1.Control.Family} family - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.family = 0; - - /** - * Control controlFamily. - * @member {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null|undefined} controlFamily - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.controlFamily = null; - - /** - * Control responsibilityType. - * @member {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType} responsibilityType - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.responsibilityType = 0; - - /** - * Control googleResponsibilityDescription. - * @member {string} googleResponsibilityDescription - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.googleResponsibilityDescription = ""; - - /** - * Control googleResponsibilityImplementation. - * @member {string} googleResponsibilityImplementation - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.googleResponsibilityImplementation = ""; - - /** - * Control customerResponsibilityDescription. - * @member {string} customerResponsibilityDescription - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.customerResponsibilityDescription = ""; - - /** - * Control customerResponsibilityImplementation. - * @member {string} customerResponsibilityImplementation - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.customerResponsibilityImplementation = ""; - - /** - * Control sharedResponsibilityDescription. - * @member {string} sharedResponsibilityDescription - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.sharedResponsibilityDescription = ""; - - /** - * Control additionalContentUri. - * @member {string} additionalContentUri - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.additionalContentUri = ""; - - /** - * Control relatedFrameworks. - * @member {Array.} relatedFrameworks - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - */ - Control.prototype.relatedFrameworks = $util.emptyArray; - - /** - * Creates a new Control instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControl=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control instance - */ - Control.create = function create(properties) { - return new Control(properties); - }; - - /** - * Encodes the specified Control message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControl} message Control message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Control.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.family != null && Object.hasOwnProperty.call(message, "family")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.family); - if (message.controlFamily != null && Object.hasOwnProperty.call(message, "controlFamily")) - $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.encode(message.controlFamily, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.responsibilityType != null && Object.hasOwnProperty.call(message, "responsibilityType")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.responsibilityType); - if (message.googleResponsibilityDescription != null && Object.hasOwnProperty.call(message, "googleResponsibilityDescription")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.googleResponsibilityDescription); - if (message.googleResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "googleResponsibilityImplementation")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.googleResponsibilityImplementation); - if (message.customerResponsibilityDescription != null && Object.hasOwnProperty.call(message, "customerResponsibilityDescription")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.customerResponsibilityDescription); - if (message.customerResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "customerResponsibilityImplementation")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.customerResponsibilityImplementation); - if (message.sharedResponsibilityDescription != null && Object.hasOwnProperty.call(message, "sharedResponsibilityDescription")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.sharedResponsibilityDescription); - if (message.additionalContentUri != null && Object.hasOwnProperty.call(message, "additionalContentUri")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.additionalContentUri); - if (message.relatedFrameworks != null && message.relatedFrameworks.length) - for (var i = 0; i < message.relatedFrameworks.length; ++i) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.relatedFrameworks[i]); - return writer; - }; - - /** - * Encodes the specified Control message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControl} message Control message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Control.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Control message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Control.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Control(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.family = reader.int32(); - break; - } - case 6: { - message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.decode(reader, reader.uint32()); - break; - } - case 7: { - message.responsibilityType = reader.int32(); - break; - } - case 8: { - message.googleResponsibilityDescription = reader.string(); - break; - } - case 9: { - message.googleResponsibilityImplementation = reader.string(); - break; - } - case 10: { - message.customerResponsibilityDescription = reader.string(); - break; - } - case 11: { - message.customerResponsibilityImplementation = reader.string(); - break; - } - case 12: { - message.sharedResponsibilityDescription = reader.string(); - break; - } - case 13: { - message.additionalContentUri = reader.string(); - break; - } - case 14: { - if (!(message.relatedFrameworks && message.relatedFrameworks.length)) - message.relatedFrameworks = []; - message.relatedFrameworks.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Control message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Control.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Control message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Control.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.family != null && message.hasOwnProperty("family")) - switch (message.family) { - default: - return "family: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify(message.controlFamily); - if (error) - return "controlFamily." + error; - } - if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) - switch (message.responsibilityType) { - default: - return "responsibilityType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) - if (!$util.isString(message.googleResponsibilityDescription)) - return "googleResponsibilityDescription: string expected"; - if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) - if (!$util.isString(message.googleResponsibilityImplementation)) - return "googleResponsibilityImplementation: string expected"; - if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) - if (!$util.isString(message.customerResponsibilityDescription)) - return "customerResponsibilityDescription: string expected"; - if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) - if (!$util.isString(message.customerResponsibilityImplementation)) - return "customerResponsibilityImplementation: string expected"; - if (message.sharedResponsibilityDescription != null && message.hasOwnProperty("sharedResponsibilityDescription")) - if (!$util.isString(message.sharedResponsibilityDescription)) - return "sharedResponsibilityDescription: string expected"; - if (message.additionalContentUri != null && message.hasOwnProperty("additionalContentUri")) - if (!$util.isString(message.additionalContentUri)) - return "additionalContentUri: string expected"; - if (message.relatedFrameworks != null && message.hasOwnProperty("relatedFrameworks")) { - if (!Array.isArray(message.relatedFrameworks)) - return "relatedFrameworks: array expected"; - for (var i = 0; i < message.relatedFrameworks.length; ++i) - if (!$util.isString(message.relatedFrameworks[i])) - return "relatedFrameworks: string[] expected"; - } - return null; - }; - - /** - * Creates a Control message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control - */ - Control.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Control) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.Control(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.family) { - default: - if (typeof object.family === "number") { - message.family = object.family; - break; - } - break; - case "FAMILY_UNSPECIFIED": - case 0: - message.family = 0; - break; - case "AC": - case 1: - message.family = 1; - break; - case "AT": - case 2: - message.family = 2; - break; - case "AU": - case 3: - message.family = 3; - break; - case "CA": - case 4: - message.family = 4; - break; - case "CM": - case 5: - message.family = 5; - break; - case "CP": - case 6: - message.family = 6; - break; - case "IA": - case 7: - message.family = 7; - break; - case "IR": - case 8: - message.family = 8; - break; - case "MA": - case 9: - message.family = 9; - break; - case "MP": - case 10: - message.family = 10; - break; - case "PE": - case 11: - message.family = 11; - break; - case "PL": - case 12: - message.family = 12; - break; - case "PS": - case 13: - message.family = 13; - break; - case "RA": - case 14: - message.family = 14; - break; - case "SA": - case 15: - message.family = 15; - break; - case "SC": - case 16: - message.family = 16; - break; - case "SI": - case 17: - message.family = 17; - break; - case "SR": - case 18: - message.family = 18; - break; - } - if (object.controlFamily != null) { - if (typeof object.controlFamily !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Control.controlFamily: object expected"); - message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.fromObject(object.controlFamily); - } - switch (object.responsibilityType) { - default: - if (typeof object.responsibilityType === "number") { - message.responsibilityType = object.responsibilityType; - break; - } - break; - case "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED": - case 0: - message.responsibilityType = 0; - break; - case "GOOGLE": - case 1: - message.responsibilityType = 1; - break; - case "CUSTOMER": - case 2: - message.responsibilityType = 2; - break; - case "SHARED": - case 3: - message.responsibilityType = 3; - break; - } - if (object.googleResponsibilityDescription != null) - message.googleResponsibilityDescription = String(object.googleResponsibilityDescription); - if (object.googleResponsibilityImplementation != null) - message.googleResponsibilityImplementation = String(object.googleResponsibilityImplementation); - if (object.customerResponsibilityDescription != null) - message.customerResponsibilityDescription = String(object.customerResponsibilityDescription); - if (object.customerResponsibilityImplementation != null) - message.customerResponsibilityImplementation = String(object.customerResponsibilityImplementation); - if (object.sharedResponsibilityDescription != null) - message.sharedResponsibilityDescription = String(object.sharedResponsibilityDescription); - if (object.additionalContentUri != null) - message.additionalContentUri = String(object.additionalContentUri); - if (object.relatedFrameworks) { - if (!Array.isArray(object.relatedFrameworks)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Control.relatedFrameworks: array expected"); - message.relatedFrameworks = []; - for (var i = 0; i < object.relatedFrameworks.length; ++i) - message.relatedFrameworks[i] = String(object.relatedFrameworks[i]); - } - return message; - }; - - /** - * Creates a plain object from a Control message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.Control} message Control - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Control.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relatedFrameworks = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.family = options.enums === String ? "FAMILY_UNSPECIFIED" : 0; - object.controlFamily = null; - object.responsibilityType = options.enums === String ? "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" : 0; - object.googleResponsibilityDescription = ""; - object.googleResponsibilityImplementation = ""; - object.customerResponsibilityDescription = ""; - object.customerResponsibilityImplementation = ""; - object.sharedResponsibilityDescription = ""; - object.additionalContentUri = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.family != null && message.hasOwnProperty("family")) - object.family = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Control.Family[message.family] === undefined ? message.family : $root.google.cloud.cloudsecuritycompliance.v1.Control.Family[message.family] : message.family; - if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) - object.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.toObject(message.controlFamily, options); - if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) - object.responsibilityType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.responsibilityType] === undefined ? message.responsibilityType : $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.responsibilityType] : message.responsibilityType; - if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) - object.googleResponsibilityDescription = message.googleResponsibilityDescription; - if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) - object.googleResponsibilityImplementation = message.googleResponsibilityImplementation; - if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) - object.customerResponsibilityDescription = message.customerResponsibilityDescription; - if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) - object.customerResponsibilityImplementation = message.customerResponsibilityImplementation; - if (message.sharedResponsibilityDescription != null && message.hasOwnProperty("sharedResponsibilityDescription")) - object.sharedResponsibilityDescription = message.sharedResponsibilityDescription; - if (message.additionalContentUri != null && message.hasOwnProperty("additionalContentUri")) - object.additionalContentUri = message.additionalContentUri; - if (message.relatedFrameworks && message.relatedFrameworks.length) { - object.relatedFrameworks = []; - for (var j = 0; j < message.relatedFrameworks.length; ++j) - object.relatedFrameworks[j] = message.relatedFrameworks[j]; - } - return object; - }; - - /** - * Converts this Control to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @instance - * @returns {Object.} JSON object - */ - Control.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Control - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.Control - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Control.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Control"; - }; - - /** - * Family enum. - * @name google.cloud.cloudsecuritycompliance.v1.Control.Family - * @enum {number} - * @property {number} FAMILY_UNSPECIFIED=0 FAMILY_UNSPECIFIED value - * @property {number} AC=1 AC value - * @property {number} AT=2 AT value - * @property {number} AU=3 AU value - * @property {number} CA=4 CA value - * @property {number} CM=5 CM value - * @property {number} CP=6 CP value - * @property {number} IA=7 IA value - * @property {number} IR=8 IR value - * @property {number} MA=9 MA value - * @property {number} MP=10 MP value - * @property {number} PE=11 PE value - * @property {number} PL=12 PL value - * @property {number} PS=13 PS value - * @property {number} RA=14 RA value - * @property {number} SA=15 SA value - * @property {number} SC=16 SC value - * @property {number} SI=17 SI value - * @property {number} SR=18 SR value - */ - Control.Family = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAMILY_UNSPECIFIED"] = 0; - values[valuesById[1] = "AC"] = 1; - values[valuesById[2] = "AT"] = 2; - values[valuesById[3] = "AU"] = 3; - values[valuesById[4] = "CA"] = 4; - values[valuesById[5] = "CM"] = 5; - values[valuesById[6] = "CP"] = 6; - values[valuesById[7] = "IA"] = 7; - values[valuesById[8] = "IR"] = 8; - values[valuesById[9] = "MA"] = 9; - values[valuesById[10] = "MP"] = 10; - values[valuesById[11] = "PE"] = 11; - values[valuesById[12] = "PL"] = 12; - values[valuesById[13] = "PS"] = 13; - values[valuesById[14] = "RA"] = 14; - values[valuesById[15] = "SA"] = 15; - values[valuesById[16] = "SC"] = 16; - values[valuesById[17] = "SI"] = 17; - values[valuesById[18] = "SR"] = 18; - return values; - })(); - - return Control; - })(); - - v1.ControlFamily = (function() { - - /** - * Properties of a ControlFamily. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IControlFamily - * @property {string|null} [familyId] ControlFamily familyId - * @property {string|null} [displayName] ControlFamily displayName - */ - - /** - * Constructs a new ControlFamily. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ControlFamily. - * @implements IControlFamily - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily=} [properties] Properties to set - */ - function ControlFamily(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ControlFamily familyId. - * @member {string} familyId - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @instance - */ - ControlFamily.prototype.familyId = ""; - - /** - * ControlFamily displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @instance - */ - ControlFamily.prototype.displayName = ""; - - /** - * Creates a new ControlFamily instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily instance - */ - ControlFamily.create = function create(properties) { - return new ControlFamily(properties); - }; - - /** - * Encodes the specified ControlFamily message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily} message ControlFamily message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlFamily.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.familyId != null && Object.hasOwnProperty.call(message, "familyId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified ControlFamily message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlFamily} message ControlFamily message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlFamily.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ControlFamily message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlFamily.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.familyId = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ControlFamily message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlFamily.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ControlFamily message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ControlFamily.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.familyId != null && message.hasOwnProperty("familyId")) - if (!$util.isString(message.familyId)) - return "familyId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; - - /** - * Creates a ControlFamily message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlFamily} ControlFamily - */ - ControlFamily.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily(); - if (object.familyId != null) - message.familyId = String(object.familyId); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from a ControlFamily message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ControlFamily} message ControlFamily - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ControlFamily.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.familyId = ""; - object.displayName = ""; - } - if (message.familyId != null && message.hasOwnProperty("familyId")) - object.familyId = message.familyId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this ControlFamily to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @instance - * @returns {Object.} JSON object - */ - ControlFamily.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ControlFamily - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlFamily - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ControlFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ControlFamily"; - }; - - return ControlFamily; - })(); - - v1.CmEnrollmentService = (function() { - - /** - * Constructs a new CmEnrollmentService service. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CmEnrollmentService - * @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 CmEnrollmentService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CmEnrollmentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CmEnrollmentService; - - /** - * Creates new CmEnrollmentService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService - * @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 {CmEnrollmentService} RPC service. Useful where requests and/or responses are streamed. - */ - CmEnrollmentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|updateCmEnrollment}. - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService - * @typedef UpdateCmEnrollmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} [response] CmEnrollment - */ - - /** - * Calls UpdateCmEnrollment. - * @function updateCmEnrollment - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} request UpdateCmEnrollmentRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollmentCallback} callback Node-style callback called with the error, if any, and CmEnrollment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CmEnrollmentService.prototype.updateCmEnrollment = function updateCmEnrollment(request, callback) { - return this.rpcCall(updateCmEnrollment, $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest, $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment, request, callback); - }, "name", { value: "UpdateCmEnrollment" }); - - /** - * Calls UpdateCmEnrollment. - * @function updateCmEnrollment - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} request UpdateCmEnrollmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService|calculateEffectiveCmEnrollment}. - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService - * @typedef CalculateEffectiveCmEnrollmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} [response] CalculateEffectiveCmEnrollmentResponse - */ - - /** - * Calls CalculateEffectiveCmEnrollment. - * @function calculateEffectiveCmEnrollment - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} request CalculateEffectiveCmEnrollmentRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollmentCallback} callback Node-style callback called with the error, if any, and CalculateEffectiveCmEnrollmentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CmEnrollmentService.prototype.calculateEffectiveCmEnrollment = function calculateEffectiveCmEnrollment(request, callback) { - return this.rpcCall(calculateEffectiveCmEnrollment, $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest, $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse, request, callback); - }, "name", { value: "CalculateEffectiveCmEnrollment" }); - - /** - * Calls CalculateEffectiveCmEnrollment. - * @function calculateEffectiveCmEnrollment - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} request CalculateEffectiveCmEnrollmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return CmEnrollmentService; - })(); - - v1.UpdateCmEnrollmentRequest = (function() { - - /** - * Properties of an UpdateCmEnrollmentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IUpdateCmEnrollmentRequest - * @property {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null} [cmEnrollment] UpdateCmEnrollmentRequest cmEnrollment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCmEnrollmentRequest updateMask - */ - - /** - * Constructs a new UpdateCmEnrollmentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an UpdateCmEnrollmentRequest. - * @implements IUpdateCmEnrollmentRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest=} [properties] Properties to set - */ - function UpdateCmEnrollmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateCmEnrollmentRequest cmEnrollment. - * @member {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null|undefined} cmEnrollment - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @instance - */ - UpdateCmEnrollmentRequest.prototype.cmEnrollment = null; - - /** - * UpdateCmEnrollmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @instance - */ - UpdateCmEnrollmentRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateCmEnrollmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest instance - */ - UpdateCmEnrollmentRequest.create = function create(properties) { - return new UpdateCmEnrollmentRequest(properties); - }; - - /** - * Encodes the specified UpdateCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} message UpdateCmEnrollmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateCmEnrollmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cmEnrollment != null && Object.hasOwnProperty.call(message, "cmEnrollment")) - $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.encode(message.cmEnrollment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest} message UpdateCmEnrollmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateCmEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateCmEnrollmentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateCmEnrollmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateCmEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateCmEnrollmentRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateCmEnrollmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify(message.cmEnrollment); - if (error) - return "cmEnrollment." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} UpdateCmEnrollmentRequest - */ - UpdateCmEnrollmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest(); - if (object.cmEnrollment != null) { - if (typeof object.cmEnrollment !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.cmEnrollment: object expected"); - message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.fromObject(object.cmEnrollment); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateCmEnrollmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest} message UpdateCmEnrollmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateCmEnrollmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cmEnrollment = null; - object.updateMask = null; - } - if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) - object.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.toObject(message.cmEnrollment, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateCmEnrollmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateCmEnrollmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateCmEnrollmentRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateCmEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest"; - }; - - return UpdateCmEnrollmentRequest; - })(); - - v1.CalculateEffectiveCmEnrollmentRequest = (function() { - - /** - * Properties of a CalculateEffectiveCmEnrollmentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICalculateEffectiveCmEnrollmentRequest - * @property {string|null} [name] CalculateEffectiveCmEnrollmentRequest name - */ - - /** - * Constructs a new CalculateEffectiveCmEnrollmentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CalculateEffectiveCmEnrollmentRequest. - * @implements ICalculateEffectiveCmEnrollmentRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest=} [properties] Properties to set - */ - function CalculateEffectiveCmEnrollmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CalculateEffectiveCmEnrollmentRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @instance - */ - CalculateEffectiveCmEnrollmentRequest.prototype.name = ""; - - /** - * Creates a new CalculateEffectiveCmEnrollmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest instance - */ - CalculateEffectiveCmEnrollmentRequest.create = function create(properties) { - return new CalculateEffectiveCmEnrollmentRequest(properties); - }; - - /** - * Encodes the specified CalculateEffectiveCmEnrollmentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} message CalculateEffectiveCmEnrollmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateEffectiveCmEnrollmentRequest.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 CalculateEffectiveCmEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest} message CalculateEffectiveCmEnrollmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateEffectiveCmEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CalculateEffectiveCmEnrollmentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CalculateEffectiveCmEnrollmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CalculateEffectiveCmEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CalculateEffectiveCmEnrollmentRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CalculateEffectiveCmEnrollmentRequest.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 CalculateEffectiveCmEnrollmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} CalculateEffectiveCmEnrollmentRequest - */ - CalculateEffectiveCmEnrollmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CalculateEffectiveCmEnrollmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest} message CalculateEffectiveCmEnrollmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CalculateEffectiveCmEnrollmentRequest.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 CalculateEffectiveCmEnrollmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @instance - * @returns {Object.} JSON object - */ - CalculateEffectiveCmEnrollmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CalculateEffectiveCmEnrollmentRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CalculateEffectiveCmEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest"; - }; - - return CalculateEffectiveCmEnrollmentRequest; - })(); - - v1.CmEnrollment = (function() { - - /** - * Properties of a CmEnrollment. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICmEnrollment - * @property {string|null} [name] CmEnrollment name - * @property {boolean|null} [enrolled] CmEnrollment enrolled - * @property {google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null} [auditConfig] CmEnrollment auditConfig - */ - - /** - * Constructs a new CmEnrollment. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CmEnrollment. - * @implements ICmEnrollment - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment=} [properties] Properties to set - */ - function CmEnrollment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CmEnrollment name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @instance - */ - CmEnrollment.prototype.name = ""; - - /** - * CmEnrollment enrolled. - * @member {boolean} enrolled - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @instance - */ - CmEnrollment.prototype.enrolled = false; - - /** - * CmEnrollment auditConfig. - * @member {google.cloud.cloudsecuritycompliance.v1.IAuditConfig|null|undefined} auditConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @instance - */ - CmEnrollment.prototype.auditConfig = null; - - /** - * Creates a new CmEnrollment instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment instance - */ - CmEnrollment.create = function create(properties) { - return new CmEnrollment(properties); - }; - - /** - * Encodes the specified CmEnrollment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment} message CmEnrollment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CmEnrollment.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.enrolled != null && Object.hasOwnProperty.call(message, "enrolled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enrolled); - if (message.auditConfig != null && Object.hasOwnProperty.call(message, "auditConfig")) - $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.encode(message.auditConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CmEnrollment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment} message CmEnrollment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CmEnrollment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CmEnrollment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CmEnrollment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.enrolled = reader.bool(); - break; - } - case 3: { - message.auditConfig = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CmEnrollment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CmEnrollment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CmEnrollment message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CmEnrollment.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.enrolled != null && message.hasOwnProperty("enrolled")) - if (typeof message.enrolled !== "boolean") - return "enrolled: boolean expected"; - if (message.auditConfig != null && message.hasOwnProperty("auditConfig")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify(message.auditConfig); - if (error) - return "auditConfig." + error; - } - return null; - }; - - /** - * Creates a CmEnrollment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} CmEnrollment - */ - CmEnrollment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment(); - if (object.name != null) - message.name = String(object.name); - if (object.enrolled != null) - message.enrolled = Boolean(object.enrolled); - if (object.auditConfig != null) { - if (typeof object.auditConfig !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CmEnrollment.auditConfig: object expected"); - message.auditConfig = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.fromObject(object.auditConfig); - } - return message; - }; - - /** - * Creates a plain object from a CmEnrollment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} message CmEnrollment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CmEnrollment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.enrolled = false; - object.auditConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.enrolled != null && message.hasOwnProperty("enrolled")) - object.enrolled = message.enrolled; - if (message.auditConfig != null && message.hasOwnProperty("auditConfig")) - object.auditConfig = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.toObject(message.auditConfig, options); - return object; - }; - - /** - * Converts this CmEnrollment to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @instance - * @returns {Object.} JSON object - */ - CmEnrollment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CmEnrollment - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CmEnrollment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CmEnrollment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CmEnrollment"; - }; - - return CmEnrollment; - })(); - - v1.CalculateEffectiveCmEnrollmentResponse = (function() { - - /** - * Properties of a CalculateEffectiveCmEnrollmentResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICalculateEffectiveCmEnrollmentResponse - * @property {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null} [cmEnrollment] CalculateEffectiveCmEnrollmentResponse cmEnrollment - */ - - /** - * Constructs a new CalculateEffectiveCmEnrollmentResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CalculateEffectiveCmEnrollmentResponse. - * @implements ICalculateEffectiveCmEnrollmentResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse=} [properties] Properties to set - */ - function CalculateEffectiveCmEnrollmentResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CalculateEffectiveCmEnrollmentResponse cmEnrollment. - * @member {google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null|undefined} cmEnrollment - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @instance - */ - CalculateEffectiveCmEnrollmentResponse.prototype.cmEnrollment = null; - - /** - * Creates a new CalculateEffectiveCmEnrollmentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse instance - */ - CalculateEffectiveCmEnrollmentResponse.create = function create(properties) { - return new CalculateEffectiveCmEnrollmentResponse(properties); - }; - - /** - * Encodes the specified CalculateEffectiveCmEnrollmentResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse} message CalculateEffectiveCmEnrollmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateEffectiveCmEnrollmentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cmEnrollment != null && Object.hasOwnProperty.call(message, "cmEnrollment")) - $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.encode(message.cmEnrollment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CalculateEffectiveCmEnrollmentResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse} message CalculateEffectiveCmEnrollmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateEffectiveCmEnrollmentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CalculateEffectiveCmEnrollmentResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CalculateEffectiveCmEnrollmentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CalculateEffectiveCmEnrollmentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CalculateEffectiveCmEnrollmentResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CalculateEffectiveCmEnrollmentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.verify(message.cmEnrollment); - if (error) - return "cmEnrollment." + error; - } - return null; - }; - - /** - * Creates a CalculateEffectiveCmEnrollmentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} CalculateEffectiveCmEnrollmentResponse - */ - CalculateEffectiveCmEnrollmentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse(); - if (object.cmEnrollment != null) { - if (typeof object.cmEnrollment !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse.cmEnrollment: object expected"); - message.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.fromObject(object.cmEnrollment); - } - return message; - }; - - /** - * Creates a plain object from a CalculateEffectiveCmEnrollmentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse} message CalculateEffectiveCmEnrollmentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CalculateEffectiveCmEnrollmentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cmEnrollment = null; - if (message.cmEnrollment != null && message.hasOwnProperty("cmEnrollment")) - object.cmEnrollment = $root.google.cloud.cloudsecuritycompliance.v1.CmEnrollment.toObject(message.cmEnrollment, options); - return object; - }; - - /** - * Converts this CalculateEffectiveCmEnrollmentResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @instance - * @returns {Object.} JSON object - */ - CalculateEffectiveCmEnrollmentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CalculateEffectiveCmEnrollmentResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CalculateEffectiveCmEnrollmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse"; - }; - - return CalculateEffectiveCmEnrollmentResponse; - })(); - - v1.AuditConfig = (function() { - - /** - * Properties of an AuditConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IAuditConfig - * @property {Array.|null} [destinations] AuditConfig destinations - */ - - /** - * Constructs a new AuditConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an AuditConfig. - * @implements IAuditConfig - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig=} [properties] Properties to set - */ - function AuditConfig(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfig destinations. - * @member {Array.} destinations - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.destinations = $util.emptyArray; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig instance - */ - AuditConfig.create = function create(properties) { - return new AuditConfig(properties); - }; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.destinations != null && message.destinations.length) - for (var i = 0; i < message.destinations.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.encode(message.destinations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - message.destinations.push($root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfig message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify(message.destinations[i]); - if (error) - return "destinations." + error; - } - } - return null; - }; - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig} AuditConfig - */ - AuditConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig(); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AuditConfig.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) { - if (typeof object.destinations[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AuditConfig.destinations: object expected"); - message.destinations[i] = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.fromObject(object.destinations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig} message AuditConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.toObject(message.destinations[j], options); - } - return object; - }; - - /** - * Converts this AuditConfig to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @instance - * @returns {Object.} JSON object - */ - AuditConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfig - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AuditConfig"; - }; - - AuditConfig.CmEligibleDestination = (function() { - - /** - * Properties of a CmEligibleDestination. - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @interface ICmEligibleDestination - * @property {string|null} [gcsBucket] CmEligibleDestination gcsBucket - */ - - /** - * Constructs a new CmEligibleDestination. - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig - * @classdesc Represents a CmEligibleDestination. - * @implements ICmEligibleDestination - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination=} [properties] Properties to set - */ - function CmEligibleDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CmEligibleDestination gcsBucket. - * @member {string|null|undefined} gcsBucket - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @instance - */ - CmEligibleDestination.prototype.gcsBucket = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CmEligibleDestination cmEligibleDestinations. - * @member {"gcsBucket"|undefined} cmEligibleDestinations - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @instance - */ - Object.defineProperty(CmEligibleDestination.prototype, "cmEligibleDestinations", { - get: $util.oneOfGetter($oneOfFields = ["gcsBucket"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CmEligibleDestination instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination instance - */ - CmEligibleDestination.create = function create(properties) { - return new CmEligibleDestination(properties); - }; - - /** - * Encodes the specified CmEligibleDestination message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination} message CmEligibleDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CmEligibleDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcsBucket != null && Object.hasOwnProperty.call(message, "gcsBucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsBucket); - return writer; - }; - - /** - * Encodes the specified CmEligibleDestination message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.ICmEligibleDestination} message CmEligibleDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CmEligibleDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CmEligibleDestination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CmEligibleDestination.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.gcsBucket = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CmEligibleDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CmEligibleDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CmEligibleDestination message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CmEligibleDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) { - properties.cmEligibleDestinations = 1; - if (!$util.isString(message.gcsBucket)) - return "gcsBucket: string expected"; - } - return null; - }; - - /** - * Creates a CmEligibleDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} CmEligibleDestination - */ - CmEligibleDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination(); - if (object.gcsBucket != null) - message.gcsBucket = String(object.gcsBucket); - return message; - }; - - /** - * Creates a plain object from a CmEligibleDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination} message CmEligibleDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CmEligibleDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) { - object.gcsBucket = message.gcsBucket; - if (options.oneofs) - object.cmEligibleDestinations = "gcsBucket"; - } - return object; - }; - - /** - * Converts this CmEligibleDestination to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @instance - * @returns {Object.} JSON object - */ - CmEligibleDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CmEligibleDestination - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CmEligibleDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestination"; - }; - - return CmEligibleDestination; - })(); - - return AuditConfig; - })(); - - v1.Config = (function() { - - /** - * Constructs a new Config service. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Config - * @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 Config(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Config.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Config; - - /** - * Creates new Config service using the specified rpc implementation. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @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 {Config} RPC service. Useful where requests and/or responses are streamed. - */ - Config.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listFrameworks}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef ListFrameworksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} [response] ListFrameworksResponse - */ - - /** - * Calls ListFrameworks. - * @function listFrameworks - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} request ListFrameworksRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworksCallback} callback Node-style callback called with the error, if any, and ListFrameworksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listFrameworks = function listFrameworks(request, callback) { - return this.rpcCall(listFrameworks, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse, request, callback); - }, "name", { value: "ListFrameworks" }); - - /** - * Calls ListFrameworks. - * @function listFrameworks - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} request ListFrameworksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getFramework}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef GetFrameworkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.Framework} [response] Framework - */ - - /** - * Calls GetFramework. - * @function getFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} request GetFrameworkRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.GetFrameworkCallback} callback Node-style callback called with the error, if any, and Framework - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getFramework = function getFramework(request, callback) { - return this.rpcCall(getFramework, $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest, $root.google.cloud.cloudsecuritycompliance.v1.Framework, request, callback); - }, "name", { value: "GetFramework" }); - - /** - * Calls GetFramework. - * @function getFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} request GetFrameworkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createFramework}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef CreateFrameworkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.Framework} [response] Framework - */ - - /** - * Calls CreateFramework. - * @function createFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} request CreateFrameworkRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.CreateFrameworkCallback} callback Node-style callback called with the error, if any, and Framework - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.createFramework = function createFramework(request, callback) { - return this.rpcCall(createFramework, $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest, $root.google.cloud.cloudsecuritycompliance.v1.Framework, request, callback); - }, "name", { value: "CreateFramework" }); - - /** - * Calls CreateFramework. - * @function createFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} request CreateFrameworkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateFramework}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef UpdateFrameworkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.Framework} [response] Framework - */ - - /** - * Calls UpdateFramework. - * @function updateFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} request UpdateFrameworkRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.UpdateFrameworkCallback} callback Node-style callback called with the error, if any, and Framework - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.updateFramework = function updateFramework(request, callback) { - return this.rpcCall(updateFramework, $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest, $root.google.cloud.cloudsecuritycompliance.v1.Framework, request, callback); - }, "name", { value: "UpdateFramework" }); - - /** - * Calls UpdateFramework. - * @function updateFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} request UpdateFrameworkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteFramework}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef DeleteFrameworkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteFramework. - * @function deleteFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} request DeleteFrameworkRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.DeleteFrameworkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.deleteFramework = function deleteFramework(request, callback) { - return this.rpcCall(deleteFramework, $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFramework" }); - - /** - * Calls DeleteFramework. - * @function deleteFramework - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} request DeleteFrameworkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|listCloudControls}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef ListCloudControlsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} [response] ListCloudControlsResponse - */ - - /** - * Calls ListCloudControls. - * @function listCloudControls - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} request ListCloudControlsRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControlsCallback} callback Node-style callback called with the error, if any, and ListCloudControlsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.listCloudControls = function listCloudControls(request, callback) { - return this.rpcCall(listCloudControls, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse, request, callback); - }, "name", { value: "ListCloudControls" }); - - /** - * Calls ListCloudControls. - * @function listCloudControls - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} request ListCloudControlsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|getCloudControl}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef GetCloudControlCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} [response] CloudControl - */ - - /** - * Calls GetCloudControl. - * @function getCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} request GetCloudControlRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControlCallback} callback Node-style callback called with the error, if any, and CloudControl - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.getCloudControl = function getCloudControl(request, callback) { - return this.rpcCall(getCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControl, request, callback); - }, "name", { value: "GetCloudControl" }); - - /** - * Calls GetCloudControl. - * @function getCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} request GetCloudControlRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|createCloudControl}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef CreateCloudControlCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} [response] CloudControl - */ - - /** - * Calls CreateCloudControl. - * @function createCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} request CreateCloudControlRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControlCallback} callback Node-style callback called with the error, if any, and CloudControl - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.createCloudControl = function createCloudControl(request, callback) { - return this.rpcCall(createCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControl, request, callback); - }, "name", { value: "CreateCloudControl" }); - - /** - * Calls CreateCloudControl. - * @function createCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} request CreateCloudControlRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|updateCloudControl}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef UpdateCloudControlCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} [response] CloudControl - */ - - /** - * Calls UpdateCloudControl. - * @function updateCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} request UpdateCloudControlRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControlCallback} callback Node-style callback called with the error, if any, and CloudControl - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.updateCloudControl = function updateCloudControl(request, callback) { - return this.rpcCall(updateCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControl, request, callback); - }, "name", { value: "UpdateCloudControl" }); - - /** - * Calls UpdateCloudControl. - * @function updateCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} request UpdateCloudControlRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Config|deleteCloudControl}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @typedef DeleteCloudControlCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteCloudControl. - * @function deleteCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} request DeleteCloudControlRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControlCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Config.prototype.deleteCloudControl = function deleteCloudControl(request, callback) { - return this.rpcCall(deleteCloudControl, $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteCloudControl" }); - - /** - * Calls DeleteCloudControl. - * @function deleteCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.Config - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} request DeleteCloudControlRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Config; - })(); - - v1.ListFrameworksRequest = (function() { - - /** - * Properties of a ListFrameworksRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworksRequest - * @property {string|null} [parent] ListFrameworksRequest parent - * @property {number|null} [pageSize] ListFrameworksRequest pageSize - * @property {string|null} [pageToken] ListFrameworksRequest pageToken - */ - - /** - * Constructs a new ListFrameworksRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworksRequest. - * @implements IListFrameworksRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest=} [properties] Properties to set - */ - function ListFrameworksRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworksRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @instance - */ - ListFrameworksRequest.prototype.parent = ""; - - /** - * ListFrameworksRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @instance - */ - ListFrameworksRequest.prototype.pageSize = 0; - - /** - * ListFrameworksRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @instance - */ - ListFrameworksRequest.prototype.pageToken = ""; - - /** - * Creates a new ListFrameworksRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest instance - */ - ListFrameworksRequest.create = function create(properties) { - return new ListFrameworksRequest(properties); - }; - - /** - * Encodes the specified ListFrameworksRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} message ListFrameworksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListFrameworksRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest} message ListFrameworksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworksRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFrameworksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworksRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworksRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListFrameworksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} ListFrameworksRequest - */ - ListFrameworksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListFrameworksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest} message ListFrameworksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListFrameworksRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @instance - * @returns {Object.} JSON object - */ - ListFrameworksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworksRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest"; - }; - - return ListFrameworksRequest; - })(); - - v1.ListFrameworksResponse = (function() { - - /** - * Properties of a ListFrameworksResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworksResponse - * @property {Array.|null} [frameworks] ListFrameworksResponse frameworks - * @property {string|null} [nextPageToken] ListFrameworksResponse nextPageToken - */ - - /** - * Constructs a new ListFrameworksResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworksResponse. - * @implements IListFrameworksResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse=} [properties] Properties to set - */ - function ListFrameworksResponse(properties) { - this.frameworks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworksResponse frameworks. - * @member {Array.} frameworks - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @instance - */ - ListFrameworksResponse.prototype.frameworks = $util.emptyArray; - - /** - * ListFrameworksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @instance - */ - ListFrameworksResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListFrameworksResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse instance - */ - ListFrameworksResponse.create = function create(properties) { - return new ListFrameworksResponse(properties); - }; - - /** - * Encodes the specified ListFrameworksResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse} message ListFrameworksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.frameworks != null && message.frameworks.length) - for (var i = 0; i < message.frameworks.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.Framework.encode(message.frameworks[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 ListFrameworksResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse} message ListFrameworksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworksResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.frameworks && message.frameworks.length)) - message.frameworks = []; - message.frameworks.push($root.google.cloud.cloudsecuritycompliance.v1.Framework.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFrameworksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworksResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.frameworks != null && message.hasOwnProperty("frameworks")) { - if (!Array.isArray(message.frameworks)) - return "frameworks: array expected"; - for (var i = 0; i < message.frameworks.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.Framework.verify(message.frameworks[i]); - if (error) - return "frameworks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListFrameworksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} ListFrameworksResponse - */ - ListFrameworksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse(); - if (object.frameworks) { - if (!Array.isArray(object.frameworks)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.frameworks: array expected"); - message.frameworks = []; - for (var i = 0; i < object.frameworks.length; ++i) { - if (typeof object.frameworks[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse.frameworks: object expected"); - message.frameworks[i] = $root.google.cloud.cloudsecuritycompliance.v1.Framework.fromObject(object.frameworks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListFrameworksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse} message ListFrameworksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.frameworks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.frameworks && message.frameworks.length) { - object.frameworks = []; - for (var j = 0; j < message.frameworks.length; ++j) - object.frameworks[j] = $root.google.cloud.cloudsecuritycompliance.v1.Framework.toObject(message.frameworks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListFrameworksResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @instance - * @returns {Object.} JSON object - */ - ListFrameworksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworksResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse"; - }; - - return ListFrameworksResponse; - })(); - - v1.GetFrameworkRequest = (function() { - - /** - * Properties of a GetFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IGetFrameworkRequest - * @property {string|null} [name] GetFrameworkRequest name - * @property {number|Long|null} [majorRevisionId] GetFrameworkRequest majorRevisionId - */ - - /** - * Constructs a new GetFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a GetFrameworkRequest. - * @implements IGetFrameworkRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest=} [properties] Properties to set - */ - function GetFrameworkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetFrameworkRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @instance - */ - GetFrameworkRequest.prototype.name = ""; - - /** - * GetFrameworkRequest majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @instance - */ - GetFrameworkRequest.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new GetFrameworkRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest instance - */ - GetFrameworkRequest.create = function create(properties) { - return new GetFrameworkRequest(properties); - }; - - /** - * Encodes the specified GetFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} message GetFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFrameworkRequest.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); - return writer; - }; - - /** - * Encodes the specified GetFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest} message GetFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetFrameworkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFrameworkRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.majorRevisionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetFrameworkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetFrameworkRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetFrameworkRequest.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - return null; - }; - - /** - * Creates a GetFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} GetFrameworkRequest - */ - GetFrameworkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a GetFrameworkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest} message GetFrameworkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetFrameworkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - return object; - }; - - /** - * Converts this GetFrameworkRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @instance - * @returns {Object.} JSON object - */ - GetFrameworkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetFrameworkRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest"; - }; - - return GetFrameworkRequest; - })(); - - v1.CreateFrameworkRequest = (function() { - - /** - * Properties of a CreateFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICreateFrameworkRequest - * @property {string|null} [parent] CreateFrameworkRequest parent - * @property {string|null} [frameworkId] CreateFrameworkRequest frameworkId - * @property {google.cloud.cloudsecuritycompliance.v1.IFramework|null} [framework] CreateFrameworkRequest framework - */ - - /** - * Constructs a new CreateFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CreateFrameworkRequest. - * @implements ICreateFrameworkRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest=} [properties] Properties to set - */ - function CreateFrameworkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateFrameworkRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @instance - */ - CreateFrameworkRequest.prototype.parent = ""; - - /** - * CreateFrameworkRequest frameworkId. - * @member {string} frameworkId - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @instance - */ - CreateFrameworkRequest.prototype.frameworkId = ""; - - /** - * CreateFrameworkRequest framework. - * @member {google.cloud.cloudsecuritycompliance.v1.IFramework|null|undefined} framework - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @instance - */ - CreateFrameworkRequest.prototype.framework = null; - - /** - * Creates a new CreateFrameworkRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest instance - */ - CreateFrameworkRequest.create = function create(properties) { - return new CreateFrameworkRequest(properties); - }; - - /** - * Encodes the specified CreateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} message CreateFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFrameworkRequest.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.frameworkId != null && Object.hasOwnProperty.call(message, "frameworkId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkId); - if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) - $root.google.cloud.cloudsecuritycompliance.v1.Framework.encode(message.framework, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest} message CreateFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateFrameworkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateFrameworkRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.frameworkId = reader.string(); - break; - } - case 3: { - message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateFrameworkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateFrameworkRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateFrameworkRequest.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.frameworkId != null && message.hasOwnProperty("frameworkId")) - if (!$util.isString(message.frameworkId)) - return "frameworkId: string expected"; - if (message.framework != null && message.hasOwnProperty("framework")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.Framework.verify(message.framework); - if (error) - return "framework." + error; - } - return null; - }; - - /** - * Creates a CreateFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} CreateFrameworkRequest - */ - CreateFrameworkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.frameworkId != null) - message.frameworkId = String(object.frameworkId); - if (object.framework != null) { - if (typeof object.framework !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest.framework: object expected"); - message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.fromObject(object.framework); - } - return message; - }; - - /** - * Creates a plain object from a CreateFrameworkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest} message CreateFrameworkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateFrameworkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.frameworkId = ""; - object.framework = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.frameworkId != null && message.hasOwnProperty("frameworkId")) - object.frameworkId = message.frameworkId; - if (message.framework != null && message.hasOwnProperty("framework")) - object.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.toObject(message.framework, options); - return object; - }; - - /** - * Converts this CreateFrameworkRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @instance - * @returns {Object.} JSON object - */ - CreateFrameworkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateFrameworkRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest"; - }; - - return CreateFrameworkRequest; - })(); - - v1.UpdateFrameworkRequest = (function() { - - /** - * Properties of an UpdateFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IUpdateFrameworkRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFrameworkRequest updateMask - * @property {google.cloud.cloudsecuritycompliance.v1.IFramework|null} [framework] UpdateFrameworkRequest framework - * @property {number|Long|null} [majorRevisionId] UpdateFrameworkRequest majorRevisionId - */ - - /** - * Constructs a new UpdateFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an UpdateFrameworkRequest. - * @implements IUpdateFrameworkRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest=} [properties] Properties to set - */ - function UpdateFrameworkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateFrameworkRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @instance - */ - UpdateFrameworkRequest.prototype.updateMask = null; - - /** - * UpdateFrameworkRequest framework. - * @member {google.cloud.cloudsecuritycompliance.v1.IFramework|null|undefined} framework - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @instance - */ - UpdateFrameworkRequest.prototype.framework = null; - - /** - * UpdateFrameworkRequest majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @instance - */ - UpdateFrameworkRequest.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new UpdateFrameworkRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest instance - */ - UpdateFrameworkRequest.create = function create(properties) { - return new UpdateFrameworkRequest(properties); - }; - - /** - * Encodes the specified UpdateFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} message UpdateFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFrameworkRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) - $root.google.cloud.cloudsecuritycompliance.v1.Framework.encode(message.framework, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.majorRevisionId); - return writer; - }; - - /** - * Encodes the specified UpdateFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest} message UpdateFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateFrameworkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFrameworkRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.decode(reader, reader.uint32()); - break; - } - case 3: { - message.majorRevisionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateFrameworkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateFrameworkRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateFrameworkRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.framework != null && message.hasOwnProperty("framework")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.Framework.verify(message.framework); - if (error) - return "framework." + error; - } - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - return null; - }; - - /** - * Creates an UpdateFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} UpdateFrameworkRequest - */ - UpdateFrameworkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.framework != null) { - if (typeof object.framework !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest.framework: object expected"); - message.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.fromObject(object.framework); - } - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an UpdateFrameworkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest} message UpdateFrameworkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateFrameworkRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.framework = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.framework != null && message.hasOwnProperty("framework")) - object.framework = $root.google.cloud.cloudsecuritycompliance.v1.Framework.toObject(message.framework, options); - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - return object; - }; - - /** - * Converts this UpdateFrameworkRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateFrameworkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateFrameworkRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest"; - }; - - return UpdateFrameworkRequest; - })(); - - v1.DeleteFrameworkRequest = (function() { - - /** - * Properties of a DeleteFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IDeleteFrameworkRequest - * @property {string|null} [name] DeleteFrameworkRequest name - */ - - /** - * Constructs a new DeleteFrameworkRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a DeleteFrameworkRequest. - * @implements IDeleteFrameworkRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest=} [properties] Properties to set - */ - function DeleteFrameworkRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteFrameworkRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @instance - */ - DeleteFrameworkRequest.prototype.name = ""; - - /** - * Creates a new DeleteFrameworkRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest instance - */ - DeleteFrameworkRequest.create = function create(properties) { - return new DeleteFrameworkRequest(properties); - }; - - /** - * Encodes the specified DeleteFrameworkRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} message DeleteFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteFrameworkRequest.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 DeleteFrameworkRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest} message DeleteFrameworkRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteFrameworkRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteFrameworkRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteFrameworkRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteFrameworkRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteFrameworkRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteFrameworkRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteFrameworkRequest.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 DeleteFrameworkRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} DeleteFrameworkRequest - */ - DeleteFrameworkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteFrameworkRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest} message DeleteFrameworkRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteFrameworkRequest.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 DeleteFrameworkRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteFrameworkRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteFrameworkRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteFrameworkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest"; - }; - - return DeleteFrameworkRequest; - })(); - - v1.ListCloudControlsRequest = (function() { - - /** - * Properties of a ListCloudControlsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListCloudControlsRequest - * @property {string|null} [parent] ListCloudControlsRequest parent - * @property {number|null} [pageSize] ListCloudControlsRequest pageSize - * @property {string|null} [pageToken] ListCloudControlsRequest pageToken - */ - - /** - * Constructs a new ListCloudControlsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListCloudControlsRequest. - * @implements IListCloudControlsRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest=} [properties] Properties to set - */ - function ListCloudControlsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListCloudControlsRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @instance - */ - ListCloudControlsRequest.prototype.parent = ""; - - /** - * ListCloudControlsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @instance - */ - ListCloudControlsRequest.prototype.pageSize = 0; - - /** - * ListCloudControlsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @instance - */ - ListCloudControlsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListCloudControlsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest instance - */ - ListCloudControlsRequest.create = function create(properties) { - return new ListCloudControlsRequest(properties); - }; - - /** - * Encodes the specified ListCloudControlsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} message ListCloudControlsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListCloudControlsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest} message ListCloudControlsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListCloudControlsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListCloudControlsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListCloudControlsRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListCloudControlsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListCloudControlsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} ListCloudControlsRequest - */ - ListCloudControlsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListCloudControlsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest} message ListCloudControlsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListCloudControlsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListCloudControlsRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @instance - * @returns {Object.} JSON object - */ - ListCloudControlsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListCloudControlsRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListCloudControlsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest"; - }; - - return ListCloudControlsRequest; - })(); - - v1.ListCloudControlsResponse = (function() { - - /** - * Properties of a ListCloudControlsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListCloudControlsResponse - * @property {Array.|null} [cloudControls] ListCloudControlsResponse cloudControls - * @property {string|null} [nextPageToken] ListCloudControlsResponse nextPageToken - */ - - /** - * Constructs a new ListCloudControlsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListCloudControlsResponse. - * @implements IListCloudControlsResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse=} [properties] Properties to set - */ - function ListCloudControlsResponse(properties) { - this.cloudControls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListCloudControlsResponse cloudControls. - * @member {Array.} cloudControls - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @instance - */ - ListCloudControlsResponse.prototype.cloudControls = $util.emptyArray; - - /** - * ListCloudControlsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @instance - */ - ListCloudControlsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListCloudControlsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse instance - */ - ListCloudControlsResponse.create = function create(properties) { - return new ListCloudControlsResponse(properties); - }; - - /** - * Encodes the specified ListCloudControlsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse} message ListCloudControlsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudControls != null && message.cloudControls.length) - for (var i = 0; i < message.cloudControls.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.cloudControls[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 ListCloudControlsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse} message ListCloudControlsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListCloudControlsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.cloudControls && message.cloudControls.length)) - message.cloudControls = []; - message.cloudControls.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListCloudControlsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListCloudControlsResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListCloudControlsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cloudControls != null && message.hasOwnProperty("cloudControls")) { - if (!Array.isArray(message.cloudControls)) - return "cloudControls: array expected"; - for (var i = 0; i < message.cloudControls.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.cloudControls[i]); - if (error) - return "cloudControls." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListCloudControlsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} ListCloudControlsResponse - */ - ListCloudControlsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse(); - if (object.cloudControls) { - if (!Array.isArray(object.cloudControls)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.cloudControls: array expected"); - message.cloudControls = []; - for (var i = 0; i < object.cloudControls.length; ++i) { - if (typeof object.cloudControls[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse.cloudControls: object expected"); - message.cloudControls[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.cloudControls[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListCloudControlsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse} message ListCloudControlsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListCloudControlsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cloudControls = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.cloudControls && message.cloudControls.length) { - object.cloudControls = []; - for (var j = 0; j < message.cloudControls.length; ++j) - object.cloudControls[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.cloudControls[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListCloudControlsResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @instance - * @returns {Object.} JSON object - */ - ListCloudControlsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListCloudControlsResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListCloudControlsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse"; - }; - - return ListCloudControlsResponse; - })(); - - v1.GetCloudControlRequest = (function() { - - /** - * Properties of a GetCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IGetCloudControlRequest - * @property {string|null} [name] GetCloudControlRequest name - * @property {number|Long|null} [majorRevisionId] GetCloudControlRequest majorRevisionId - */ - - /** - * Constructs a new GetCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a GetCloudControlRequest. - * @implements IGetCloudControlRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest=} [properties] Properties to set - */ - function GetCloudControlRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetCloudControlRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @instance - */ - GetCloudControlRequest.prototype.name = ""; - - /** - * GetCloudControlRequest majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @instance - */ - GetCloudControlRequest.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new GetCloudControlRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest instance - */ - GetCloudControlRequest.create = function create(properties) { - return new GetCloudControlRequest(properties); - }; - - /** - * Encodes the specified GetCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} message GetCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCloudControlRequest.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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.majorRevisionId); - return writer; - }; - - /** - * Encodes the specified GetCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest} message GetCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCloudControlRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCloudControlRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.majorRevisionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCloudControlRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCloudControlRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCloudControlRequest.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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - return null; - }; - - /** - * Creates a GetCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} GetCloudControlRequest - */ - GetCloudControlRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a GetCloudControlRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest} message GetCloudControlRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCloudControlRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - return object; - }; - - /** - * Converts this GetCloudControlRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @instance - * @returns {Object.} JSON object - */ - GetCloudControlRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetCloudControlRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest"; - }; - - return GetCloudControlRequest; - })(); - - v1.CreateCloudControlRequest = (function() { - - /** - * Properties of a CreateCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICreateCloudControlRequest - * @property {string|null} [parent] CreateCloudControlRequest parent - * @property {string|null} [cloudControlId] CreateCloudControlRequest cloudControlId - * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null} [cloudControl] CreateCloudControlRequest cloudControl - */ - - /** - * Constructs a new CreateCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CreateCloudControlRequest. - * @implements ICreateCloudControlRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest=} [properties] Properties to set - */ - function CreateCloudControlRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateCloudControlRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @instance - */ - CreateCloudControlRequest.prototype.parent = ""; - - /** - * CreateCloudControlRequest cloudControlId. - * @member {string} cloudControlId - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @instance - */ - CreateCloudControlRequest.prototype.cloudControlId = ""; - - /** - * CreateCloudControlRequest cloudControl. - * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null|undefined} cloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @instance - */ - CreateCloudControlRequest.prototype.cloudControl = null; - - /** - * Creates a new CreateCloudControlRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest instance - */ - CreateCloudControlRequest.create = function create(properties) { - return new CreateCloudControlRequest(properties); - }; - - /** - * Encodes the specified CreateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} message CreateCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateCloudControlRequest.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.cloudControlId != null && Object.hasOwnProperty.call(message, "cloudControlId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudControlId); - if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.cloudControl, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest} message CreateCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateCloudControlRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateCloudControlRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.cloudControlId = reader.string(); - break; - } - case 3: { - message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateCloudControlRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateCloudControlRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateCloudControlRequest.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.cloudControlId != null && message.hasOwnProperty("cloudControlId")) - if (!$util.isString(message.cloudControlId)) - return "cloudControlId: string expected"; - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.cloudControl); - if (error) - return "cloudControl." + error; - } - return null; - }; - - /** - * Creates a CreateCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} CreateCloudControlRequest - */ - CreateCloudControlRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.cloudControlId != null) - message.cloudControlId = String(object.cloudControlId); - if (object.cloudControl != null) { - if (typeof object.cloudControl !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest.cloudControl: object expected"); - message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.cloudControl); - } - return message; - }; - - /** - * Creates a plain object from a CreateCloudControlRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest} message CreateCloudControlRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateCloudControlRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.cloudControlId = ""; - object.cloudControl = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.cloudControlId != null && message.hasOwnProperty("cloudControlId")) - object.cloudControlId = message.cloudControlId; - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) - object.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.cloudControl, options); - return object; - }; - - /** - * Converts this CreateCloudControlRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @instance - * @returns {Object.} JSON object - */ - CreateCloudControlRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateCloudControlRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest"; - }; - - return CreateCloudControlRequest; - })(); - - v1.UpdateCloudControlRequest = (function() { - - /** - * Properties of an UpdateCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IUpdateCloudControlRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCloudControlRequest updateMask - * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null} [cloudControl] UpdateCloudControlRequest cloudControl - */ - - /** - * Constructs a new UpdateCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an UpdateCloudControlRequest. - * @implements IUpdateCloudControlRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest=} [properties] Properties to set - */ - function UpdateCloudControlRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateCloudControlRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @instance - */ - UpdateCloudControlRequest.prototype.updateMask = null; - - /** - * UpdateCloudControlRequest cloudControl. - * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null|undefined} cloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @instance - */ - UpdateCloudControlRequest.prototype.cloudControl = null; - - /** - * Creates a new UpdateCloudControlRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest instance - */ - UpdateCloudControlRequest.create = function create(properties) { - return new UpdateCloudControlRequest(properties); - }; - - /** - * Encodes the specified UpdateCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} message UpdateCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateCloudControlRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.cloudControl, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest} message UpdateCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateCloudControlRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateCloudControlRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateCloudControlRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateCloudControlRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateCloudControlRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.cloudControl); - if (error) - return "cloudControl." + error; - } - return null; - }; - - /** - * Creates an UpdateCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} UpdateCloudControlRequest - */ - UpdateCloudControlRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.cloudControl != null) { - if (typeof object.cloudControl !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest.cloudControl: object expected"); - message.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.cloudControl); - } - return message; - }; - - /** - * Creates a plain object from an UpdateCloudControlRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest} message UpdateCloudControlRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateCloudControlRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.cloudControl = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) - object.cloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.cloudControl, options); - return object; - }; - - /** - * Converts this UpdateCloudControlRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateCloudControlRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateCloudControlRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest"; - }; - - return UpdateCloudControlRequest; - })(); - - v1.DeleteCloudControlRequest = (function() { - - /** - * Properties of a DeleteCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IDeleteCloudControlRequest - * @property {string|null} [name] DeleteCloudControlRequest name - */ - - /** - * Constructs a new DeleteCloudControlRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a DeleteCloudControlRequest. - * @implements IDeleteCloudControlRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest=} [properties] Properties to set - */ - function DeleteCloudControlRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteCloudControlRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @instance - */ - DeleteCloudControlRequest.prototype.name = ""; - - /** - * Creates a new DeleteCloudControlRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest instance - */ - DeleteCloudControlRequest.create = function create(properties) { - return new DeleteCloudControlRequest(properties); - }; - - /** - * Encodes the specified DeleteCloudControlRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} message DeleteCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteCloudControlRequest.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 DeleteCloudControlRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest} message DeleteCloudControlRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteCloudControlRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteCloudControlRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteCloudControlRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteCloudControlRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteCloudControlRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteCloudControlRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteCloudControlRequest.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 DeleteCloudControlRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} DeleteCloudControlRequest - */ - DeleteCloudControlRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteCloudControlRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest} message DeleteCloudControlRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteCloudControlRequest.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 DeleteCloudControlRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteCloudControlRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteCloudControlRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteCloudControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest"; - }; - - return DeleteCloudControlRequest; - })(); - - v1.Deployment = (function() { - - /** - * Constructs a new Deployment service. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Deployment - * @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 Deployment(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Deployment.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployment; - - /** - * Creates new Deployment service using the specified rpc implementation. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @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 {Deployment} RPC service. Useful where requests and/or responses are streamed. - */ - Deployment.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|createFrameworkDeployment}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @typedef CreateFrameworkDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateFrameworkDeployment. - * @function createFrameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} request CreateFrameworkDeploymentRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeploymentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployment.prototype.createFrameworkDeployment = function createFrameworkDeployment(request, callback) { - return this.rpcCall(createFrameworkDeployment, $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateFrameworkDeployment" }); - - /** - * Calls CreateFrameworkDeployment. - * @function createFrameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} request CreateFrameworkDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|deleteFrameworkDeployment}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @typedef DeleteFrameworkDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteFrameworkDeployment. - * @function deleteFrameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} request DeleteFrameworkDeploymentRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeploymentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployment.prototype.deleteFrameworkDeployment = function deleteFrameworkDeployment(request, callback) { - return this.rpcCall(deleteFrameworkDeployment, $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteFrameworkDeployment" }); - - /** - * Calls DeleteFrameworkDeployment. - * @function deleteFrameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} request DeleteFrameworkDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getFrameworkDeployment}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @typedef GetFrameworkDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} [response] FrameworkDeployment - */ - - /** - * Calls GetFrameworkDeployment. - * @function getFrameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} request GetFrameworkDeploymentRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeploymentCallback} callback Node-style callback called with the error, if any, and FrameworkDeployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployment.prototype.getFrameworkDeployment = function getFrameworkDeployment(request, callback) { - return this.rpcCall(getFrameworkDeployment, $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest, $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment, request, callback); - }, "name", { value: "GetFrameworkDeployment" }); - - /** - * Calls GetFrameworkDeployment. - * @function getFrameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} request GetFrameworkDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listFrameworkDeployments}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @typedef ListFrameworkDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} [response] ListFrameworkDeploymentsResponse - */ - - /** - * Calls ListFrameworkDeployments. - * @function listFrameworkDeployments - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} request ListFrameworkDeploymentsRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeploymentsCallback} callback Node-style callback called with the error, if any, and ListFrameworkDeploymentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployment.prototype.listFrameworkDeployments = function listFrameworkDeployments(request, callback) { - return this.rpcCall(listFrameworkDeployments, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse, request, callback); - }, "name", { value: "ListFrameworkDeployments" }); - - /** - * Calls ListFrameworkDeployments. - * @function listFrameworkDeployments - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} request ListFrameworkDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|getCloudControlDeployment}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @typedef GetCloudControlDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} [response] CloudControlDeployment - */ - - /** - * Calls GetCloudControlDeployment. - * @function getCloudControlDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} request GetCloudControlDeploymentRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeploymentCallback} callback Node-style callback called with the error, if any, and CloudControlDeployment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployment.prototype.getCloudControlDeployment = function getCloudControlDeployment(request, callback) { - return this.rpcCall(getCloudControlDeployment, $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest, $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment, request, callback); - }, "name", { value: "GetCloudControlDeployment" }); - - /** - * Calls GetCloudControlDeployment. - * @function getCloudControlDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} request GetCloudControlDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Deployment|listCloudControlDeployments}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @typedef ListCloudControlDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} [response] ListCloudControlDeploymentsResponse - */ - - /** - * Calls ListCloudControlDeployments. - * @function listCloudControlDeployments - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} request ListCloudControlDeploymentsRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeploymentsCallback} callback Node-style callback called with the error, if any, and ListCloudControlDeploymentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Deployment.prototype.listCloudControlDeployments = function listCloudControlDeployments(request, callback) { - return this.rpcCall(listCloudControlDeployments, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse, request, callback); - }, "name", { value: "ListCloudControlDeployments" }); - - /** - * Calls ListCloudControlDeployments. - * @function listCloudControlDeployments - * @memberof google.cloud.cloudsecuritycompliance.v1.Deployment - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} request ListCloudControlDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Deployment; - })(); - - /** - * DeploymentState enum. - * @name google.cloud.cloudsecuritycompliance.v1.DeploymentState - * @enum {number} - * @property {number} DEPLOYMENT_STATE_UNSPECIFIED=0 DEPLOYMENT_STATE_UNSPECIFIED value - * @property {number} DEPLOYMENT_STATE_VALIDATING=1 DEPLOYMENT_STATE_VALIDATING value - * @property {number} DEPLOYMENT_STATE_CREATING=2 DEPLOYMENT_STATE_CREATING value - * @property {number} DEPLOYMENT_STATE_DELETING=3 DEPLOYMENT_STATE_DELETING value - * @property {number} DEPLOYMENT_STATE_UPDATING=8 DEPLOYMENT_STATE_UPDATING value - * @property {number} DEPLOYMENT_STATE_FAILED=4 DEPLOYMENT_STATE_FAILED value - * @property {number} DEPLOYMENT_STATE_READY=5 DEPLOYMENT_STATE_READY value - * @property {number} DEPLOYMENT_STATE_PARTIALLY_DEPLOYED=6 DEPLOYMENT_STATE_PARTIALLY_DEPLOYED value - * @property {number} DEPLOYMENT_STATE_PARTIALLY_DELETED=7 DEPLOYMENT_STATE_PARTIALLY_DELETED value - */ - v1.DeploymentState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEPLOYMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEPLOYMENT_STATE_VALIDATING"] = 1; - values[valuesById[2] = "DEPLOYMENT_STATE_CREATING"] = 2; - values[valuesById[3] = "DEPLOYMENT_STATE_DELETING"] = 3; - values[valuesById[8] = "DEPLOYMENT_STATE_UPDATING"] = 8; - values[valuesById[4] = "DEPLOYMENT_STATE_FAILED"] = 4; - values[valuesById[5] = "DEPLOYMENT_STATE_READY"] = 5; - values[valuesById[6] = "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED"] = 6; - values[valuesById[7] = "DEPLOYMENT_STATE_PARTIALLY_DELETED"] = 7; - return values; - })(); - - v1.FrameworkDeployment = (function() { - - /** - * Properties of a FrameworkDeployment. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFrameworkDeployment - * @property {string|null} [name] FrameworkDeployment name - * @property {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null} [targetResourceConfig] FrameworkDeployment targetResourceConfig - * @property {string|null} [computedTargetResource] FrameworkDeployment computedTargetResource - * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null} [framework] FrameworkDeployment framework - * @property {string|null} [description] FrameworkDeployment description - * @property {Array.|null} [cloudControlMetadata] FrameworkDeployment cloudControlMetadata - * @property {google.cloud.cloudsecuritycompliance.v1.DeploymentState|null} [deploymentState] FrameworkDeployment deploymentState - * @property {google.protobuf.ITimestamp|null} [createTime] FrameworkDeployment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] FrameworkDeployment updateTime - * @property {string|null} [etag] FrameworkDeployment etag - * @property {string|null} [targetResourceDisplayName] FrameworkDeployment targetResourceDisplayName - * @property {Array.|null} [cloudControlDeploymentReferences] FrameworkDeployment cloudControlDeploymentReferences - */ - - /** - * Constructs a new FrameworkDeployment. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FrameworkDeployment. - * @implements IFrameworkDeployment - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment=} [properties] Properties to set - */ - function FrameworkDeployment(properties) { - this.cloudControlMetadata = []; - this.cloudControlDeploymentReferences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FrameworkDeployment name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.name = ""; - - /** - * FrameworkDeployment targetResourceConfig. - * @member {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null|undefined} targetResourceConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.targetResourceConfig = null; - - /** - * FrameworkDeployment computedTargetResource. - * @member {string} computedTargetResource - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.computedTargetResource = ""; - - /** - * FrameworkDeployment framework. - * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null|undefined} framework - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.framework = null; - - /** - * FrameworkDeployment description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.description = ""; - - /** - * FrameworkDeployment cloudControlMetadata. - * @member {Array.} cloudControlMetadata - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.cloudControlMetadata = $util.emptyArray; - - /** - * FrameworkDeployment deploymentState. - * @member {google.cloud.cloudsecuritycompliance.v1.DeploymentState} deploymentState - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.deploymentState = 0; - - /** - * FrameworkDeployment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.createTime = null; - - /** - * FrameworkDeployment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.updateTime = null; - - /** - * FrameworkDeployment etag. - * @member {string} etag - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.etag = ""; - - /** - * FrameworkDeployment targetResourceDisplayName. - * @member {string} targetResourceDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.targetResourceDisplayName = ""; - - /** - * FrameworkDeployment cloudControlDeploymentReferences. - * @member {Array.} cloudControlDeploymentReferences - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - */ - FrameworkDeployment.prototype.cloudControlDeploymentReferences = $util.emptyArray; - - /** - * Creates a new FrameworkDeployment instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment instance - */ - FrameworkDeployment.create = function create(properties) { - return new FrameworkDeployment(properties); - }; - - /** - * Encodes the specified FrameworkDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment} message FrameworkDeployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkDeployment.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.targetResourceConfig != null && Object.hasOwnProperty.call(message, "targetResourceConfig")) - $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.encode(message.targetResourceConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.computedTargetResource != null && Object.hasOwnProperty.call(message, "computedTargetResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.computedTargetResource); - if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.encode(message.framework, 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.cloudControlMetadata != null && message.cloudControlMetadata.length) - for (var i = 0; i < message.cloudControlMetadata.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.encode(message.cloudControlMetadata[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.deploymentState != null && Object.hasOwnProperty.call(message, "deploymentState")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.deploymentState); - 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.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); - if (message.targetResourceDisplayName != null && Object.hasOwnProperty.call(message, "targetResourceDisplayName")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.targetResourceDisplayName); - if (message.cloudControlDeploymentReferences != null && message.cloudControlDeploymentReferences.length) - for (var i = 0; i < message.cloudControlDeploymentReferences.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.encode(message.cloudControlDeploymentReferences[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FrameworkDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment} message FrameworkDeployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkDeployment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FrameworkDeployment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkDeployment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.computedTargetResource = reader.string(); - break; - } - case 4: { - message.framework = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - if (!(message.cloudControlMetadata && message.cloudControlMetadata.length)) - message.cloudControlMetadata = []; - message.cloudControlMetadata.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.decode(reader, reader.uint32())); - break; - } - case 7: { - message.deploymentState = reader.int32(); - 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: { - message.etag = reader.string(); - break; - } - case 13: { - message.targetResourceDisplayName = reader.string(); - break; - } - case 14: { - if (!(message.cloudControlDeploymentReferences && message.cloudControlDeploymentReferences.length)) - message.cloudControlDeploymentReferences = []; - message.cloudControlDeploymentReferences.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FrameworkDeployment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkDeployment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FrameworkDeployment message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FrameworkDeployment.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.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify(message.targetResourceConfig); - if (error) - return "targetResourceConfig." + error; - } - if (message.computedTargetResource != null && message.hasOwnProperty("computedTargetResource")) - if (!$util.isString(message.computedTargetResource)) - return "computedTargetResource: string expected"; - if (message.framework != null && message.hasOwnProperty("framework")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify(message.framework); - if (error) - return "framework." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.cloudControlMetadata != null && message.hasOwnProperty("cloudControlMetadata")) { - if (!Array.isArray(message.cloudControlMetadata)) - return "cloudControlMetadata: array expected"; - for (var i = 0; i < message.cloudControlMetadata.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify(message.cloudControlMetadata[i]); - if (error) - return "cloudControlMetadata." + error; - } - } - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - switch (message.deploymentState) { - default: - return "deploymentState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 8: - case 4: - case 5: - case 6: - case 7: - 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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) - if (!$util.isString(message.targetResourceDisplayName)) - return "targetResourceDisplayName: string expected"; - if (message.cloudControlDeploymentReferences != null && message.hasOwnProperty("cloudControlDeploymentReferences")) { - if (!Array.isArray(message.cloudControlDeploymentReferences)) - return "cloudControlDeploymentReferences: array expected"; - for (var i = 0; i < message.cloudControlDeploymentReferences.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify(message.cloudControlDeploymentReferences[i]); - if (error) - return "cloudControlDeploymentReferences." + error; - } - } - return null; - }; - - /** - * Creates a FrameworkDeployment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} FrameworkDeployment - */ - FrameworkDeployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment(); - if (object.name != null) - message.name = String(object.name); - if (object.targetResourceConfig != null) { - if (typeof object.targetResourceConfig !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.targetResourceConfig: object expected"); - message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.fromObject(object.targetResourceConfig); - } - if (object.computedTargetResource != null) - message.computedTargetResource = String(object.computedTargetResource); - if (object.framework != null) { - if (typeof object.framework !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.framework: object expected"); - message.framework = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.fromObject(object.framework); - } - if (object.description != null) - message.description = String(object.description); - if (object.cloudControlMetadata) { - if (!Array.isArray(object.cloudControlMetadata)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlMetadata: array expected"); - message.cloudControlMetadata = []; - for (var i = 0; i < object.cloudControlMetadata.length; ++i) { - if (typeof object.cloudControlMetadata[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlMetadata: object expected"); - message.cloudControlMetadata[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.fromObject(object.cloudControlMetadata[i]); - } - } - switch (object.deploymentState) { - default: - if (typeof object.deploymentState === "number") { - message.deploymentState = object.deploymentState; - break; - } - break; - case "DEPLOYMENT_STATE_UNSPECIFIED": - case 0: - message.deploymentState = 0; - break; - case "DEPLOYMENT_STATE_VALIDATING": - case 1: - message.deploymentState = 1; - break; - case "DEPLOYMENT_STATE_CREATING": - case 2: - message.deploymentState = 2; - break; - case "DEPLOYMENT_STATE_DELETING": - case 3: - message.deploymentState = 3; - break; - case "DEPLOYMENT_STATE_UPDATING": - case 8: - message.deploymentState = 8; - break; - case "DEPLOYMENT_STATE_FAILED": - case 4: - message.deploymentState = 4; - break; - case "DEPLOYMENT_STATE_READY": - case 5: - message.deploymentState = 5; - break; - case "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED": - case 6: - message.deploymentState = 6; - break; - case "DEPLOYMENT_STATE_PARTIALLY_DELETED": - case 7: - message.deploymentState = 7; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.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.cloudsecuritycompliance.v1.FrameworkDeployment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.targetResourceDisplayName != null) - message.targetResourceDisplayName = String(object.targetResourceDisplayName); - if (object.cloudControlDeploymentReferences) { - if (!Array.isArray(object.cloudControlDeploymentReferences)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlDeploymentReferences: array expected"); - message.cloudControlDeploymentReferences = []; - for (var i = 0; i < object.cloudControlDeploymentReferences.length; ++i) { - if (typeof object.cloudControlDeploymentReferences[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.cloudControlDeploymentReferences: object expected"); - message.cloudControlDeploymentReferences[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.fromObject(object.cloudControlDeploymentReferences[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FrameworkDeployment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} message FrameworkDeployment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameworkDeployment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cloudControlMetadata = []; - object.cloudControlDeploymentReferences = []; - } - if (options.defaults) { - object.name = ""; - object.targetResourceConfig = null; - object.computedTargetResource = ""; - object.framework = null; - object.description = ""; - object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.updateTime = null; - object.etag = ""; - object.targetResourceDisplayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) - object.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.toObject(message.targetResourceConfig, options); - if (message.computedTargetResource != null && message.hasOwnProperty("computedTargetResource")) - object.computedTargetResource = message.computedTargetResource; - if (message.framework != null && message.hasOwnProperty("framework")) - object.framework = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.toObject(message.framework, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.cloudControlMetadata && message.cloudControlMetadata.length) { - object.cloudControlMetadata = []; - for (var j = 0; j < message.cloudControlMetadata.length; ++j) - object.cloudControlMetadata[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.toObject(message.cloudControlMetadata[j], options); - } - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - object.deploymentState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] === undefined ? message.deploymentState : $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] : message.deploymentState; - 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.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) - object.targetResourceDisplayName = message.targetResourceDisplayName; - if (message.cloudControlDeploymentReferences && message.cloudControlDeploymentReferences.length) { - object.cloudControlDeploymentReferences = []; - for (var j = 0; j < message.cloudControlDeploymentReferences.length; ++j) - object.cloudControlDeploymentReferences[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.toObject(message.cloudControlDeploymentReferences[j], options); - } - return object; - }; - - /** - * Converts this FrameworkDeployment to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @instance - * @returns {Object.} JSON object - */ - FrameworkDeployment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FrameworkDeployment - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FrameworkDeployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment"; - }; - - return FrameworkDeployment; - })(); - - v1.CloudControlDeployment = (function() { - - /** - * Properties of a CloudControlDeployment. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlDeployment - * @property {string|null} [name] CloudControlDeployment name - * @property {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null} [targetResourceConfig] CloudControlDeployment targetResourceConfig - * @property {string|null} [targetResource] CloudControlDeployment targetResource - * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null} [cloudControlMetadata] CloudControlDeployment cloudControlMetadata - * @property {string|null} [description] CloudControlDeployment description - * @property {google.cloud.cloudsecuritycompliance.v1.DeploymentState|null} [deploymentState] CloudControlDeployment deploymentState - * @property {google.protobuf.ITimestamp|null} [createTime] CloudControlDeployment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] CloudControlDeployment updateTime - * @property {string|null} [etag] CloudControlDeployment etag - * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null} [parameterSubstitutedCloudControl] CloudControlDeployment parameterSubstitutedCloudControl - * @property {Array.|null} [frameworkDeploymentReferences] CloudControlDeployment frameworkDeploymentReferences - * @property {string|null} [targetResourceDisplayName] CloudControlDeployment targetResourceDisplayName - */ - - /** - * Constructs a new CloudControlDeployment. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlDeployment. - * @implements ICloudControlDeployment - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment=} [properties] Properties to set - */ - function CloudControlDeployment(properties) { - this.frameworkDeploymentReferences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlDeployment name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.name = ""; - - /** - * CloudControlDeployment targetResourceConfig. - * @member {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig|null|undefined} targetResourceConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.targetResourceConfig = null; - - /** - * CloudControlDeployment targetResource. - * @member {string} targetResource - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.targetResource = ""; - - /** - * CloudControlDeployment cloudControlMetadata. - * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata|null|undefined} cloudControlMetadata - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.cloudControlMetadata = null; - - /** - * CloudControlDeployment description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.description = ""; - - /** - * CloudControlDeployment deploymentState. - * @member {google.cloud.cloudsecuritycompliance.v1.DeploymentState} deploymentState - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.deploymentState = 0; - - /** - * CloudControlDeployment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.createTime = null; - - /** - * CloudControlDeployment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.updateTime = null; - - /** - * CloudControlDeployment etag. - * @member {string} etag - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.etag = ""; - - /** - * CloudControlDeployment parameterSubstitutedCloudControl. - * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControl|null|undefined} parameterSubstitutedCloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.parameterSubstitutedCloudControl = null; - - /** - * CloudControlDeployment frameworkDeploymentReferences. - * @member {Array.} frameworkDeploymentReferences - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.frameworkDeploymentReferences = $util.emptyArray; - - /** - * CloudControlDeployment targetResourceDisplayName. - * @member {string} targetResourceDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - */ - CloudControlDeployment.prototype.targetResourceDisplayName = ""; - - /** - * Creates a new CloudControlDeployment instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment instance - */ - CloudControlDeployment.create = function create(properties) { - return new CloudControlDeployment(properties); - }; - - /** - * Encodes the specified CloudControlDeployment message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment} message CloudControlDeployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlDeployment.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.targetResourceConfig != null && Object.hasOwnProperty.call(message, "targetResourceConfig")) - $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.encode(message.targetResourceConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetResource); - if (message.cloudControlMetadata != null && Object.hasOwnProperty.call(message, "cloudControlMetadata")) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.encode(message.cloudControlMetadata, 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.deploymentState != null && Object.hasOwnProperty.call(message, "deploymentState")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.deploymentState); - 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.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.parameterSubstitutedCloudControl != null && Object.hasOwnProperty.call(message, "parameterSubstitutedCloudControl")) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.encode(message.parameterSubstitutedCloudControl, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.frameworkDeploymentReferences != null && message.frameworkDeploymentReferences.length) - for (var i = 0; i < message.frameworkDeploymentReferences.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.encode(message.frameworkDeploymentReferences[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.targetResourceDisplayName != null && Object.hasOwnProperty.call(message, "targetResourceDisplayName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.targetResourceDisplayName); - return writer; - }; - - /** - * Encodes the specified CloudControlDeployment message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment} message CloudControlDeployment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlDeployment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlDeployment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlDeployment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.targetResource = reader.string(); - break; - } - case 4: { - message.cloudControlMetadata = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.deploymentState = 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.etag = reader.string(); - break; - } - case 10: { - message.parameterSubstitutedCloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.decode(reader, reader.uint32()); - break; - } - case 11: { - if (!(message.frameworkDeploymentReferences && message.frameworkDeploymentReferences.length)) - message.frameworkDeploymentReferences = []; - message.frameworkDeploymentReferences.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.decode(reader, reader.uint32())); - break; - } - case 12: { - message.targetResourceDisplayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlDeployment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlDeployment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlDeployment message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlDeployment.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.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify(message.targetResourceConfig); - if (error) - return "targetResourceConfig." + error; - } - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - if (!$util.isString(message.targetResource)) - return "targetResource: string expected"; - if (message.cloudControlMetadata != null && message.hasOwnProperty("cloudControlMetadata")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify(message.cloudControlMetadata); - if (error) - return "cloudControlMetadata." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - switch (message.deploymentState) { - default: - return "deploymentState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 8: - case 4: - case 5: - case 6: - case 7: - 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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.parameterSubstitutedCloudControl != null && message.hasOwnProperty("parameterSubstitutedCloudControl")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.verify(message.parameterSubstitutedCloudControl); - if (error) - return "parameterSubstitutedCloudControl." + error; - } - if (message.frameworkDeploymentReferences != null && message.hasOwnProperty("frameworkDeploymentReferences")) { - if (!Array.isArray(message.frameworkDeploymentReferences)) - return "frameworkDeploymentReferences: array expected"; - for (var i = 0; i < message.frameworkDeploymentReferences.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify(message.frameworkDeploymentReferences[i]); - if (error) - return "frameworkDeploymentReferences." + error; - } - } - if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) - if (!$util.isString(message.targetResourceDisplayName)) - return "targetResourceDisplayName: string expected"; - return null; - }; - - /** - * Creates a CloudControlDeployment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} CloudControlDeployment - */ - CloudControlDeployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment(); - if (object.name != null) - message.name = String(object.name); - if (object.targetResourceConfig != null) { - if (typeof object.targetResourceConfig !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.targetResourceConfig: object expected"); - message.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.fromObject(object.targetResourceConfig); - } - if (object.targetResource != null) - message.targetResource = String(object.targetResource); - if (object.cloudControlMetadata != null) { - if (typeof object.cloudControlMetadata !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.cloudControlMetadata: object expected"); - message.cloudControlMetadata = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.fromObject(object.cloudControlMetadata); - } - if (object.description != null) - message.description = String(object.description); - switch (object.deploymentState) { - default: - if (typeof object.deploymentState === "number") { - message.deploymentState = object.deploymentState; - break; - } - break; - case "DEPLOYMENT_STATE_UNSPECIFIED": - case 0: - message.deploymentState = 0; - break; - case "DEPLOYMENT_STATE_VALIDATING": - case 1: - message.deploymentState = 1; - break; - case "DEPLOYMENT_STATE_CREATING": - case 2: - message.deploymentState = 2; - break; - case "DEPLOYMENT_STATE_DELETING": - case 3: - message.deploymentState = 3; - break; - case "DEPLOYMENT_STATE_UPDATING": - case 8: - message.deploymentState = 8; - break; - case "DEPLOYMENT_STATE_FAILED": - case 4: - message.deploymentState = 4; - break; - case "DEPLOYMENT_STATE_READY": - case 5: - message.deploymentState = 5; - break; - case "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED": - case 6: - message.deploymentState = 6; - break; - case "DEPLOYMENT_STATE_PARTIALLY_DELETED": - case 7: - message.deploymentState = 7; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.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.cloudsecuritycompliance.v1.CloudControlDeployment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.parameterSubstitutedCloudControl != null) { - if (typeof object.parameterSubstitutedCloudControl !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.parameterSubstitutedCloudControl: object expected"); - message.parameterSubstitutedCloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.fromObject(object.parameterSubstitutedCloudControl); - } - if (object.frameworkDeploymentReferences) { - if (!Array.isArray(object.frameworkDeploymentReferences)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.frameworkDeploymentReferences: array expected"); - message.frameworkDeploymentReferences = []; - for (var i = 0; i < object.frameworkDeploymentReferences.length; ++i) { - if (typeof object.frameworkDeploymentReferences[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.frameworkDeploymentReferences: object expected"); - message.frameworkDeploymentReferences[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.fromObject(object.frameworkDeploymentReferences[i]); - } - } - if (object.targetResourceDisplayName != null) - message.targetResourceDisplayName = String(object.targetResourceDisplayName); - return message; - }; - - /** - * Creates a plain object from a CloudControlDeployment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment} message CloudControlDeployment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlDeployment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.frameworkDeploymentReferences = []; - if (options.defaults) { - object.name = ""; - object.targetResourceConfig = null; - object.targetResource = ""; - object.cloudControlMetadata = null; - object.description = ""; - object.deploymentState = options.enums === String ? "DEPLOYMENT_STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.updateTime = null; - object.etag = ""; - object.parameterSubstitutedCloudControl = null; - object.targetResourceDisplayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.targetResourceConfig != null && message.hasOwnProperty("targetResourceConfig")) - object.targetResourceConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.toObject(message.targetResourceConfig, options); - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - object.targetResource = message.targetResource; - if (message.cloudControlMetadata != null && message.hasOwnProperty("cloudControlMetadata")) - object.cloudControlMetadata = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.toObject(message.cloudControlMetadata, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - object.deploymentState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] === undefined ? message.deploymentState : $root.google.cloud.cloudsecuritycompliance.v1.DeploymentState[message.deploymentState] : message.deploymentState; - 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.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.parameterSubstitutedCloudControl != null && message.hasOwnProperty("parameterSubstitutedCloudControl")) - object.parameterSubstitutedCloudControl = $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.toObject(message.parameterSubstitutedCloudControl, options); - if (message.frameworkDeploymentReferences && message.frameworkDeploymentReferences.length) { - object.frameworkDeploymentReferences = []; - for (var j = 0; j < message.frameworkDeploymentReferences.length; ++j) - object.frameworkDeploymentReferences[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.toObject(message.frameworkDeploymentReferences[j], options); - } - if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) - object.targetResourceDisplayName = message.targetResourceDisplayName; - return object; - }; - - /** - * Converts this CloudControlDeployment to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @instance - * @returns {Object.} JSON object - */ - CloudControlDeployment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlDeployment - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlDeployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment"; - }; - - return CloudControlDeployment; - })(); - - v1.TargetResourceConfig = (function() { - - /** - * Properties of a TargetResourceConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ITargetResourceConfig - * @property {string|null} [existingTargetResource] TargetResourceConfig existingTargetResource - * @property {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null} [targetResourceCreationConfig] TargetResourceConfig targetResourceCreationConfig - */ - - /** - * Constructs a new TargetResourceConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a TargetResourceConfig. - * @implements ITargetResourceConfig - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig=} [properties] Properties to set - */ - function TargetResourceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TargetResourceConfig existingTargetResource. - * @member {string|null|undefined} existingTargetResource - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @instance - */ - TargetResourceConfig.prototype.existingTargetResource = null; - - /** - * TargetResourceConfig targetResourceCreationConfig. - * @member {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig|null|undefined} targetResourceCreationConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @instance - */ - TargetResourceConfig.prototype.targetResourceCreationConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TargetResourceConfig resourceConfig. - * @member {"existingTargetResource"|"targetResourceCreationConfig"|undefined} resourceConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @instance - */ - Object.defineProperty(TargetResourceConfig.prototype, "resourceConfig", { - get: $util.oneOfGetter($oneOfFields = ["existingTargetResource", "targetResourceCreationConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TargetResourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig instance - */ - TargetResourceConfig.create = function create(properties) { - return new TargetResourceConfig(properties); - }; - - /** - * Encodes the specified TargetResourceConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig} message TargetResourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.existingTargetResource != null && Object.hasOwnProperty.call(message, "existingTargetResource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.existingTargetResource); - if (message.targetResourceCreationConfig != null && Object.hasOwnProperty.call(message, "targetResourceCreationConfig")) - $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.encode(message.targetResourceCreationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TargetResourceConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceConfig} message TargetResourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetResourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResourceConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.existingTargetResource = reader.string(); - break; - } - case 2: { - message.targetResourceCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetResourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetResourceConfig message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetResourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.existingTargetResource != null && message.hasOwnProperty("existingTargetResource")) { - properties.resourceConfig = 1; - if (!$util.isString(message.existingTargetResource)) - return "existingTargetResource: string expected"; - } - if (message.targetResourceCreationConfig != null && message.hasOwnProperty("targetResourceCreationConfig")) { - if (properties.resourceConfig === 1) - return "resourceConfig: multiple values"; - properties.resourceConfig = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify(message.targetResourceCreationConfig); - if (error) - return "targetResourceCreationConfig." + error; - } - } - return null; - }; - - /** - * Creates a TargetResourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} TargetResourceConfig - */ - TargetResourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig(); - if (object.existingTargetResource != null) - message.existingTargetResource = String(object.existingTargetResource); - if (object.targetResourceCreationConfig != null) { - if (typeof object.targetResourceCreationConfig !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig.targetResourceCreationConfig: object expected"); - message.targetResourceCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.fromObject(object.targetResourceCreationConfig); - } - return message; - }; - - /** - * Creates a plain object from a TargetResourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig} message TargetResourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetResourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.existingTargetResource != null && message.hasOwnProperty("existingTargetResource")) { - object.existingTargetResource = message.existingTargetResource; - if (options.oneofs) - object.resourceConfig = "existingTargetResource"; - } - if (message.targetResourceCreationConfig != null && message.hasOwnProperty("targetResourceCreationConfig")) { - object.targetResourceCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.toObject(message.targetResourceCreationConfig, options); - if (options.oneofs) - object.resourceConfig = "targetResourceCreationConfig"; - } - return object; - }; - - /** - * Converts this TargetResourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @instance - * @returns {Object.} JSON object - */ - TargetResourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetResourceConfig - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetResourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig"; - }; - - return TargetResourceConfig; - })(); - - v1.TargetResourceCreationConfig = (function() { - - /** - * Properties of a TargetResourceCreationConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ITargetResourceCreationConfig - * @property {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null} [folderCreationConfig] TargetResourceCreationConfig folderCreationConfig - * @property {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null} [projectCreationConfig] TargetResourceCreationConfig projectCreationConfig - */ - - /** - * Constructs a new TargetResourceCreationConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a TargetResourceCreationConfig. - * @implements ITargetResourceCreationConfig - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig=} [properties] Properties to set - */ - function TargetResourceCreationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TargetResourceCreationConfig folderCreationConfig. - * @member {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig|null|undefined} folderCreationConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @instance - */ - TargetResourceCreationConfig.prototype.folderCreationConfig = null; - - /** - * TargetResourceCreationConfig projectCreationConfig. - * @member {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig|null|undefined} projectCreationConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @instance - */ - TargetResourceCreationConfig.prototype.projectCreationConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TargetResourceCreationConfig resourceCreationConfig. - * @member {"folderCreationConfig"|"projectCreationConfig"|undefined} resourceCreationConfig - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @instance - */ - Object.defineProperty(TargetResourceCreationConfig.prototype, "resourceCreationConfig", { - get: $util.oneOfGetter($oneOfFields = ["folderCreationConfig", "projectCreationConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TargetResourceCreationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig instance - */ - TargetResourceCreationConfig.create = function create(properties) { - return new TargetResourceCreationConfig(properties); - }; - - /** - * Encodes the specified TargetResourceCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig} message TargetResourceCreationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResourceCreationConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.folderCreationConfig != null && Object.hasOwnProperty.call(message, "folderCreationConfig")) - $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.encode(message.folderCreationConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.projectCreationConfig != null && Object.hasOwnProperty.call(message, "projectCreationConfig")) - $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.encode(message.projectCreationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TargetResourceCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceCreationConfig} message TargetResourceCreationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResourceCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetResourceCreationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResourceCreationConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.folderCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.decode(reader, reader.uint32()); - break; - } - case 2: { - message.projectCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetResourceCreationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResourceCreationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetResourceCreationConfig message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetResourceCreationConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.folderCreationConfig != null && message.hasOwnProperty("folderCreationConfig")) { - properties.resourceCreationConfig = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify(message.folderCreationConfig); - if (error) - return "folderCreationConfig." + error; - } - } - if (message.projectCreationConfig != null && message.hasOwnProperty("projectCreationConfig")) { - if (properties.resourceCreationConfig === 1) - return "resourceCreationConfig: multiple values"; - properties.resourceCreationConfig = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify(message.projectCreationConfig); - if (error) - return "projectCreationConfig." + error; - } - } - return null; - }; - - /** - * Creates a TargetResourceCreationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} TargetResourceCreationConfig - */ - TargetResourceCreationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig(); - if (object.folderCreationConfig != null) { - if (typeof object.folderCreationConfig !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.folderCreationConfig: object expected"); - message.folderCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.fromObject(object.folderCreationConfig); - } - if (object.projectCreationConfig != null) { - if (typeof object.projectCreationConfig !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig.projectCreationConfig: object expected"); - message.projectCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.fromObject(object.projectCreationConfig); - } - return message; - }; - - /** - * Creates a plain object from a TargetResourceCreationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig} message TargetResourceCreationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetResourceCreationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.folderCreationConfig != null && message.hasOwnProperty("folderCreationConfig")) { - object.folderCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.toObject(message.folderCreationConfig, options); - if (options.oneofs) - object.resourceCreationConfig = "folderCreationConfig"; - } - if (message.projectCreationConfig != null && message.hasOwnProperty("projectCreationConfig")) { - object.projectCreationConfig = $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.toObject(message.projectCreationConfig, options); - if (options.oneofs) - object.resourceCreationConfig = "projectCreationConfig"; - } - return object; - }; - - /** - * Converts this TargetResourceCreationConfig to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @instance - * @returns {Object.} JSON object - */ - TargetResourceCreationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetResourceCreationConfig - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetResourceCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig"; - }; - - return TargetResourceCreationConfig; - })(); - - v1.FolderCreationConfig = (function() { - - /** - * Properties of a FolderCreationConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFolderCreationConfig - * @property {string|null} [parent] FolderCreationConfig parent - * @property {string|null} [folderDisplayName] FolderCreationConfig folderDisplayName - */ - - /** - * Constructs a new FolderCreationConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FolderCreationConfig. - * @implements IFolderCreationConfig - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig=} [properties] Properties to set - */ - function FolderCreationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FolderCreationConfig parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @instance - */ - FolderCreationConfig.prototype.parent = ""; - - /** - * FolderCreationConfig folderDisplayName. - * @member {string} folderDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @instance - */ - FolderCreationConfig.prototype.folderDisplayName = ""; - - /** - * Creates a new FolderCreationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig instance - */ - FolderCreationConfig.create = function create(properties) { - return new FolderCreationConfig(properties); - }; - - /** - * Encodes the specified FolderCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig} message FolderCreationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FolderCreationConfig.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.folderDisplayName != null && Object.hasOwnProperty.call(message, "folderDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.folderDisplayName); - return writer; - }; - - /** - * Encodes the specified FolderCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFolderCreationConfig} message FolderCreationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FolderCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FolderCreationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FolderCreationConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.folderDisplayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FolderCreationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FolderCreationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FolderCreationConfig message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FolderCreationConfig.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.folderDisplayName != null && message.hasOwnProperty("folderDisplayName")) - if (!$util.isString(message.folderDisplayName)) - return "folderDisplayName: string expected"; - return null; - }; - - /** - * Creates a FolderCreationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} FolderCreationConfig - */ - FolderCreationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.folderDisplayName != null) - message.folderDisplayName = String(object.folderDisplayName); - return message; - }; - - /** - * Creates a plain object from a FolderCreationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig} message FolderCreationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FolderCreationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.folderDisplayName = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.folderDisplayName != null && message.hasOwnProperty("folderDisplayName")) - object.folderDisplayName = message.folderDisplayName; - return object; - }; - - /** - * Converts this FolderCreationConfig to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @instance - * @returns {Object.} JSON object - */ - FolderCreationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FolderCreationConfig - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FolderCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig"; - }; - - return FolderCreationConfig; - })(); - - v1.ProjectCreationConfig = (function() { - - /** - * Properties of a ProjectCreationConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IProjectCreationConfig - * @property {string|null} [parent] ProjectCreationConfig parent - * @property {string|null} [projectDisplayName] ProjectCreationConfig projectDisplayName - * @property {string|null} [billingAccountId] ProjectCreationConfig billingAccountId - */ - - /** - * Constructs a new ProjectCreationConfig. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ProjectCreationConfig. - * @implements IProjectCreationConfig - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig=} [properties] Properties to set - */ - function ProjectCreationConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProjectCreationConfig parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @instance - */ - ProjectCreationConfig.prototype.parent = ""; - - /** - * ProjectCreationConfig projectDisplayName. - * @member {string} projectDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @instance - */ - ProjectCreationConfig.prototype.projectDisplayName = ""; - - /** - * ProjectCreationConfig billingAccountId. - * @member {string} billingAccountId - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @instance - */ - ProjectCreationConfig.prototype.billingAccountId = ""; - - /** - * Creates a new ProjectCreationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig instance - */ - ProjectCreationConfig.create = function create(properties) { - return new ProjectCreationConfig(properties); - }; - - /** - * Encodes the specified ProjectCreationConfig message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig} message ProjectCreationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProjectCreationConfig.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.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectDisplayName); - if (message.billingAccountId != null && Object.hasOwnProperty.call(message, "billingAccountId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.billingAccountId); - return writer; - }; - - /** - * Encodes the specified ProjectCreationConfig message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IProjectCreationConfig} message ProjectCreationConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProjectCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProjectCreationConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProjectCreationConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.projectDisplayName = reader.string(); - break; - } - case 3: { - message.billingAccountId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProjectCreationConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProjectCreationConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProjectCreationConfig message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProjectCreationConfig.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.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) - if (!$util.isString(message.projectDisplayName)) - return "projectDisplayName: string expected"; - if (message.billingAccountId != null && message.hasOwnProperty("billingAccountId")) - if (!$util.isString(message.billingAccountId)) - return "billingAccountId: string expected"; - return null; - }; - - /** - * Creates a ProjectCreationConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} ProjectCreationConfig - */ - ProjectCreationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.projectDisplayName != null) - message.projectDisplayName = String(object.projectDisplayName); - if (object.billingAccountId != null) - message.billingAccountId = String(object.billingAccountId); - return message; - }; - - /** - * Creates a plain object from a ProjectCreationConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig} message ProjectCreationConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProjectCreationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.projectDisplayName = ""; - object.billingAccountId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) - object.projectDisplayName = message.projectDisplayName; - if (message.billingAccountId != null && message.hasOwnProperty("billingAccountId")) - object.billingAccountId = message.billingAccountId; - return object; - }; - - /** - * Converts this ProjectCreationConfig to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @instance - * @returns {Object.} JSON object - */ - ProjectCreationConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProjectCreationConfig - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProjectCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig"; - }; - - return ProjectCreationConfig; - })(); - - v1.CloudControlMetadata = (function() { - - /** - * Properties of a CloudControlMetadata. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlMetadata - * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null} [cloudControlDetails] CloudControlMetadata cloudControlDetails - * @property {google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null} [enforcementMode] CloudControlMetadata enforcementMode - */ - - /** - * Constructs a new CloudControlMetadata. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlMetadata. - * @implements ICloudControlMetadata - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata=} [properties] Properties to set - */ - function CloudControlMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlMetadata cloudControlDetails. - * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControlDetails|null|undefined} cloudControlDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @instance - */ - CloudControlMetadata.prototype.cloudControlDetails = null; - - /** - * CloudControlMetadata enforcementMode. - * @member {google.cloud.cloudsecuritycompliance.v1.EnforcementMode} enforcementMode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @instance - */ - CloudControlMetadata.prototype.enforcementMode = 0; - - /** - * Creates a new CloudControlMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata instance - */ - CloudControlMetadata.create = function create(properties) { - return new CloudControlMetadata(properties); - }; - - /** - * Encodes the specified CloudControlMetadata message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata} message CloudControlMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudControlDetails != null && Object.hasOwnProperty.call(message, "cloudControlDetails")) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.encode(message.cloudControlDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.enforcementMode != null && Object.hasOwnProperty.call(message, "enforcementMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enforcementMode); - return writer; - }; - - /** - * Encodes the specified CloudControlMetadata message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlMetadata} message CloudControlMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.cloudControlDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.decode(reader, reader.uint32()); - break; - } - case 2: { - message.enforcementMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlMetadata message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.verify(message.cloudControlDetails); - if (error) - return "cloudControlDetails." + error; - } - if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) - switch (message.enforcementMode) { - default: - return "enforcementMode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a CloudControlMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} CloudControlMetadata - */ - CloudControlMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata(); - if (object.cloudControlDetails != null) { - if (typeof object.cloudControlDetails !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata.cloudControlDetails: object expected"); - message.cloudControlDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.fromObject(object.cloudControlDetails); - } - switch (object.enforcementMode) { - default: - if (typeof object.enforcementMode === "number") { - message.enforcementMode = object.enforcementMode; - break; - } - break; - case "ENFORCEMENT_MODE_UNSPECIFIED": - case 0: - message.enforcementMode = 0; - break; - case "PREVENTIVE": - case 1: - message.enforcementMode = 1; - break; - case "DETECTIVE": - case 2: - message.enforcementMode = 2; - break; - case "AUDIT": - case 3: - message.enforcementMode = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a CloudControlMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata} message CloudControlMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cloudControlDetails = null; - object.enforcementMode = options.enums === String ? "ENFORCEMENT_MODE_UNSPECIFIED" : 0; - } - if (message.cloudControlDetails != null && message.hasOwnProperty("cloudControlDetails")) - object.cloudControlDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDetails.toObject(message.cloudControlDetails, options); - if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) - object.enforcementMode = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] === undefined ? message.enforcementMode : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] : message.enforcementMode; - return object; - }; - - /** - * Converts this CloudControlMetadata to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @instance - * @returns {Object.} JSON object - */ - CloudControlMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlMetadata - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata"; - }; - - return CloudControlMetadata; - })(); - - v1.CreateFrameworkDeploymentRequest = (function() { - - /** - * Properties of a CreateFrameworkDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICreateFrameworkDeploymentRequest - * @property {string|null} [parent] CreateFrameworkDeploymentRequest parent - * @property {string|null} [frameworkDeploymentId] CreateFrameworkDeploymentRequest frameworkDeploymentId - * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null} [frameworkDeployment] CreateFrameworkDeploymentRequest frameworkDeployment - */ - - /** - * Constructs a new CreateFrameworkDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CreateFrameworkDeploymentRequest. - * @implements ICreateFrameworkDeploymentRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest=} [properties] Properties to set - */ - function CreateFrameworkDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateFrameworkDeploymentRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @instance - */ - CreateFrameworkDeploymentRequest.prototype.parent = ""; - - /** - * CreateFrameworkDeploymentRequest frameworkDeploymentId. - * @member {string} frameworkDeploymentId - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @instance - */ - CreateFrameworkDeploymentRequest.prototype.frameworkDeploymentId = ""; - - /** - * CreateFrameworkDeploymentRequest frameworkDeployment. - * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null|undefined} frameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @instance - */ - CreateFrameworkDeploymentRequest.prototype.frameworkDeployment = null; - - /** - * Creates a new CreateFrameworkDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest instance - */ - CreateFrameworkDeploymentRequest.create = function create(properties) { - return new CreateFrameworkDeploymentRequest(properties); - }; - - /** - * Encodes the specified CreateFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} message CreateFrameworkDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFrameworkDeploymentRequest.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.frameworkDeploymentId != null && Object.hasOwnProperty.call(message, "frameworkDeploymentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkDeploymentId); - if (message.frameworkDeployment != null && Object.hasOwnProperty.call(message, "frameworkDeployment")) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.encode(message.frameworkDeployment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest} message CreateFrameworkDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateFrameworkDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateFrameworkDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.frameworkDeploymentId = reader.string(); - break; - } - case 3: { - message.frameworkDeployment = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateFrameworkDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateFrameworkDeploymentRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateFrameworkDeploymentRequest.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.frameworkDeploymentId != null && message.hasOwnProperty("frameworkDeploymentId")) - if (!$util.isString(message.frameworkDeploymentId)) - return "frameworkDeploymentId: string expected"; - if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify(message.frameworkDeployment); - if (error) - return "frameworkDeployment." + error; - } - return null; - }; - - /** - * Creates a CreateFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} CreateFrameworkDeploymentRequest - */ - CreateFrameworkDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.frameworkDeploymentId != null) - message.frameworkDeploymentId = String(object.frameworkDeploymentId); - if (object.frameworkDeployment != null) { - if (typeof object.frameworkDeployment !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest.frameworkDeployment: object expected"); - message.frameworkDeployment = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.fromObject(object.frameworkDeployment); - } - return message; - }; - - /** - * Creates a plain object from a CreateFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest} message CreateFrameworkDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateFrameworkDeploymentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.frameworkDeploymentId = ""; - object.frameworkDeployment = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.frameworkDeploymentId != null && message.hasOwnProperty("frameworkDeploymentId")) - object.frameworkDeploymentId = message.frameworkDeploymentId; - if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) - object.frameworkDeployment = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.toObject(message.frameworkDeployment, options); - return object; - }; - - /** - * Converts this CreateFrameworkDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateFrameworkDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateFrameworkDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateFrameworkDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest"; - }; - - return CreateFrameworkDeploymentRequest; - })(); - - v1.DeleteFrameworkDeploymentRequest = (function() { - - /** - * Properties of a DeleteFrameworkDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IDeleteFrameworkDeploymentRequest - * @property {string|null} [name] DeleteFrameworkDeploymentRequest name - * @property {string|null} [etag] DeleteFrameworkDeploymentRequest etag - */ - - /** - * Constructs a new DeleteFrameworkDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a DeleteFrameworkDeploymentRequest. - * @implements IDeleteFrameworkDeploymentRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest=} [properties] Properties to set - */ - function DeleteFrameworkDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteFrameworkDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @instance - */ - DeleteFrameworkDeploymentRequest.prototype.name = ""; - - /** - * DeleteFrameworkDeploymentRequest etag. - * @member {string} etag - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @instance - */ - DeleteFrameworkDeploymentRequest.prototype.etag = ""; - - /** - * Creates a new DeleteFrameworkDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest instance - */ - DeleteFrameworkDeploymentRequest.create = function create(properties) { - return new DeleteFrameworkDeploymentRequest(properties); - }; - - /** - * Encodes the specified DeleteFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} message DeleteFrameworkDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteFrameworkDeploymentRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest} message DeleteFrameworkDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteFrameworkDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteFrameworkDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteFrameworkDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteFrameworkDeploymentRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteFrameworkDeploymentRequest.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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} DeleteFrameworkDeploymentRequest - */ - DeleteFrameworkDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest} message DeleteFrameworkDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteFrameworkDeploymentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteFrameworkDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteFrameworkDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteFrameworkDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteFrameworkDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest"; - }; - - return DeleteFrameworkDeploymentRequest; - })(); - - v1.GetFrameworkDeploymentRequest = (function() { - - /** - * Properties of a GetFrameworkDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IGetFrameworkDeploymentRequest - * @property {string|null} [name] GetFrameworkDeploymentRequest name - */ - - /** - * Constructs a new GetFrameworkDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a GetFrameworkDeploymentRequest. - * @implements IGetFrameworkDeploymentRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest=} [properties] Properties to set - */ - function GetFrameworkDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetFrameworkDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @instance - */ - GetFrameworkDeploymentRequest.prototype.name = ""; - - /** - * Creates a new GetFrameworkDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest instance - */ - GetFrameworkDeploymentRequest.create = function create(properties) { - return new GetFrameworkDeploymentRequest(properties); - }; - - /** - * Encodes the specified GetFrameworkDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} message GetFrameworkDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFrameworkDeploymentRequest.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 GetFrameworkDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest} message GetFrameworkDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetFrameworkDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFrameworkDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetFrameworkDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetFrameworkDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetFrameworkDeploymentRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetFrameworkDeploymentRequest.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 GetFrameworkDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} GetFrameworkDeploymentRequest - */ - GetFrameworkDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetFrameworkDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest} message GetFrameworkDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetFrameworkDeploymentRequest.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 GetFrameworkDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - GetFrameworkDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetFrameworkDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetFrameworkDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest"; - }; - - return GetFrameworkDeploymentRequest; - })(); - - v1.ListFrameworkDeploymentsRequest = (function() { - - /** - * Properties of a ListFrameworkDeploymentsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworkDeploymentsRequest - * @property {string|null} [parent] ListFrameworkDeploymentsRequest parent - * @property {number|null} [pageSize] ListFrameworkDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListFrameworkDeploymentsRequest pageToken - * @property {string|null} [filter] ListFrameworkDeploymentsRequest filter - * @property {string|null} [orderBy] ListFrameworkDeploymentsRequest orderBy - */ - - /** - * Constructs a new ListFrameworkDeploymentsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworkDeploymentsRequest. - * @implements IListFrameworkDeploymentsRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest=} [properties] Properties to set - */ - function ListFrameworkDeploymentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworkDeploymentsRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @instance - */ - ListFrameworkDeploymentsRequest.prototype.parent = ""; - - /** - * ListFrameworkDeploymentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @instance - */ - ListFrameworkDeploymentsRequest.prototype.pageSize = 0; - - /** - * ListFrameworkDeploymentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @instance - */ - ListFrameworkDeploymentsRequest.prototype.pageToken = ""; - - /** - * ListFrameworkDeploymentsRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @instance - */ - ListFrameworkDeploymentsRequest.prototype.filter = ""; - - /** - * ListFrameworkDeploymentsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @instance - */ - ListFrameworkDeploymentsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListFrameworkDeploymentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest instance - */ - ListFrameworkDeploymentsRequest.create = function create(properties) { - return new ListFrameworkDeploymentsRequest(properties); - }; - - /** - * Encodes the specified ListFrameworkDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} message ListFrameworkDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkDeploymentsRequest.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 ListFrameworkDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest} message ListFrameworkDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworkDeploymentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkDeploymentsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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 ListFrameworkDeploymentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworkDeploymentsRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworkDeploymentsRequest.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 ListFrameworkDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} ListFrameworkDeploymentsRequest - */ - ListFrameworkDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest(); - 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 ListFrameworkDeploymentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest} message ListFrameworkDeploymentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworkDeploymentsRequest.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 ListFrameworkDeploymentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListFrameworkDeploymentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworkDeploymentsRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworkDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest"; - }; - - return ListFrameworkDeploymentsRequest; - })(); - - v1.ListFrameworkDeploymentsResponse = (function() { - - /** - * Properties of a ListFrameworkDeploymentsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworkDeploymentsResponse - * @property {Array.|null} [frameworkDeployments] ListFrameworkDeploymentsResponse frameworkDeployments - * @property {string|null} [nextPageToken] ListFrameworkDeploymentsResponse nextPageToken - */ - - /** - * Constructs a new ListFrameworkDeploymentsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworkDeploymentsResponse. - * @implements IListFrameworkDeploymentsResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse=} [properties] Properties to set - */ - function ListFrameworkDeploymentsResponse(properties) { - this.frameworkDeployments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworkDeploymentsResponse frameworkDeployments. - * @member {Array.} frameworkDeployments - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @instance - */ - ListFrameworkDeploymentsResponse.prototype.frameworkDeployments = $util.emptyArray; - - /** - * ListFrameworkDeploymentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @instance - */ - ListFrameworkDeploymentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListFrameworkDeploymentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse instance - */ - ListFrameworkDeploymentsResponse.create = function create(properties) { - return new ListFrameworkDeploymentsResponse(properties); - }; - - /** - * Encodes the specified ListFrameworkDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse} message ListFrameworkDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkDeploymentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.frameworkDeployments != null && message.frameworkDeployments.length) - for (var i = 0; i < message.frameworkDeployments.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.encode(message.frameworkDeployments[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 ListFrameworkDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse} message ListFrameworkDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkDeploymentsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.frameworkDeployments && message.frameworkDeployments.length)) - message.frameworkDeployments = []; - message.frameworkDeployments.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFrameworkDeploymentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworkDeploymentsResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworkDeploymentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.frameworkDeployments != null && message.hasOwnProperty("frameworkDeployments")) { - if (!Array.isArray(message.frameworkDeployments)) - return "frameworkDeployments: array expected"; - for (var i = 0; i < message.frameworkDeployments.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.verify(message.frameworkDeployments[i]); - if (error) - return "frameworkDeployments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListFrameworkDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} ListFrameworkDeploymentsResponse - */ - ListFrameworkDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse(); - if (object.frameworkDeployments) { - if (!Array.isArray(object.frameworkDeployments)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.frameworkDeployments: array expected"); - message.frameworkDeployments = []; - for (var i = 0; i < object.frameworkDeployments.length; ++i) { - if (typeof object.frameworkDeployments[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse.frameworkDeployments: object expected"); - message.frameworkDeployments[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.fromObject(object.frameworkDeployments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListFrameworkDeploymentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse} message ListFrameworkDeploymentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworkDeploymentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.frameworkDeployments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.frameworkDeployments && message.frameworkDeployments.length) { - object.frameworkDeployments = []; - for (var j = 0; j < message.frameworkDeployments.length; ++j) - object.frameworkDeployments[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment.toObject(message.frameworkDeployments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListFrameworkDeploymentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListFrameworkDeploymentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworkDeploymentsResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworkDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse"; - }; - - return ListFrameworkDeploymentsResponse; - })(); - - v1.GetCloudControlDeploymentRequest = (function() { - - /** - * Properties of a GetCloudControlDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IGetCloudControlDeploymentRequest - * @property {string|null} [name] GetCloudControlDeploymentRequest name - */ - - /** - * Constructs a new GetCloudControlDeploymentRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a GetCloudControlDeploymentRequest. - * @implements IGetCloudControlDeploymentRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest=} [properties] Properties to set - */ - function GetCloudControlDeploymentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetCloudControlDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @instance - */ - GetCloudControlDeploymentRequest.prototype.name = ""; - - /** - * Creates a new GetCloudControlDeploymentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest instance - */ - GetCloudControlDeploymentRequest.create = function create(properties) { - return new GetCloudControlDeploymentRequest(properties); - }; - - /** - * Encodes the specified GetCloudControlDeploymentRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} message GetCloudControlDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCloudControlDeploymentRequest.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 GetCloudControlDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest} message GetCloudControlDeploymentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCloudControlDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCloudControlDeploymentRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCloudControlDeploymentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCloudControlDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCloudControlDeploymentRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCloudControlDeploymentRequest.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 GetCloudControlDeploymentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} GetCloudControlDeploymentRequest - */ - GetCloudControlDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetCloudControlDeploymentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest} message GetCloudControlDeploymentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCloudControlDeploymentRequest.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 GetCloudControlDeploymentRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @instance - * @returns {Object.} JSON object - */ - GetCloudControlDeploymentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetCloudControlDeploymentRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetCloudControlDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest"; - }; - - return GetCloudControlDeploymentRequest; - })(); - - v1.ListCloudControlDeploymentsRequest = (function() { - - /** - * Properties of a ListCloudControlDeploymentsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListCloudControlDeploymentsRequest - * @property {string|null} [parent] ListCloudControlDeploymentsRequest parent - * @property {number|null} [pageSize] ListCloudControlDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListCloudControlDeploymentsRequest pageToken - * @property {string|null} [filter] ListCloudControlDeploymentsRequest filter - * @property {string|null} [orderBy] ListCloudControlDeploymentsRequest orderBy - */ - - /** - * Constructs a new ListCloudControlDeploymentsRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListCloudControlDeploymentsRequest. - * @implements IListCloudControlDeploymentsRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest=} [properties] Properties to set - */ - function ListCloudControlDeploymentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListCloudControlDeploymentsRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @instance - */ - ListCloudControlDeploymentsRequest.prototype.parent = ""; - - /** - * ListCloudControlDeploymentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @instance - */ - ListCloudControlDeploymentsRequest.prototype.pageSize = 0; - - /** - * ListCloudControlDeploymentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @instance - */ - ListCloudControlDeploymentsRequest.prototype.pageToken = ""; - - /** - * ListCloudControlDeploymentsRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @instance - */ - ListCloudControlDeploymentsRequest.prototype.filter = ""; - - /** - * ListCloudControlDeploymentsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @instance - */ - ListCloudControlDeploymentsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListCloudControlDeploymentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest instance - */ - ListCloudControlDeploymentsRequest.create = function create(properties) { - return new ListCloudControlDeploymentsRequest(properties); - }; - - /** - * Encodes the specified ListCloudControlDeploymentsRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} message ListCloudControlDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlDeploymentsRequest.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 ListCloudControlDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest} message ListCloudControlDeploymentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListCloudControlDeploymentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlDeploymentsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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 ListCloudControlDeploymentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListCloudControlDeploymentsRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListCloudControlDeploymentsRequest.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 ListCloudControlDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} ListCloudControlDeploymentsRequest - */ - ListCloudControlDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest(); - 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 ListCloudControlDeploymentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest} message ListCloudControlDeploymentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListCloudControlDeploymentsRequest.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 ListCloudControlDeploymentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListCloudControlDeploymentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListCloudControlDeploymentsRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListCloudControlDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest"; - }; - - return ListCloudControlDeploymentsRequest; - })(); - - v1.ListCloudControlDeploymentsResponse = (function() { - - /** - * Properties of a ListCloudControlDeploymentsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListCloudControlDeploymentsResponse - * @property {Array.|null} [cloudControlDeployments] ListCloudControlDeploymentsResponse cloudControlDeployments - * @property {string|null} [nextPageToken] ListCloudControlDeploymentsResponse nextPageToken - */ - - /** - * Constructs a new ListCloudControlDeploymentsResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListCloudControlDeploymentsResponse. - * @implements IListCloudControlDeploymentsResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse=} [properties] Properties to set - */ - function ListCloudControlDeploymentsResponse(properties) { - this.cloudControlDeployments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListCloudControlDeploymentsResponse cloudControlDeployments. - * @member {Array.} cloudControlDeployments - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @instance - */ - ListCloudControlDeploymentsResponse.prototype.cloudControlDeployments = $util.emptyArray; - - /** - * ListCloudControlDeploymentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @instance - */ - ListCloudControlDeploymentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListCloudControlDeploymentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse instance - */ - ListCloudControlDeploymentsResponse.create = function create(properties) { - return new ListCloudControlDeploymentsResponse(properties); - }; - - /** - * Encodes the specified ListCloudControlDeploymentsResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse} message ListCloudControlDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlDeploymentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudControlDeployments != null && message.cloudControlDeployments.length) - for (var i = 0; i < message.cloudControlDeployments.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.encode(message.cloudControlDeployments[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 ListCloudControlDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse} message ListCloudControlDeploymentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListCloudControlDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlDeploymentsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.cloudControlDeployments && message.cloudControlDeployments.length)) - message.cloudControlDeployments = []; - message.cloudControlDeployments.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListCloudControlDeploymentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListCloudControlDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListCloudControlDeploymentsResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListCloudControlDeploymentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cloudControlDeployments != null && message.hasOwnProperty("cloudControlDeployments")) { - if (!Array.isArray(message.cloudControlDeployments)) - return "cloudControlDeployments: array expected"; - for (var i = 0; i < message.cloudControlDeployments.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.verify(message.cloudControlDeployments[i]); - if (error) - return "cloudControlDeployments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListCloudControlDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} ListCloudControlDeploymentsResponse - */ - ListCloudControlDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse(); - if (object.cloudControlDeployments) { - if (!Array.isArray(object.cloudControlDeployments)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.cloudControlDeployments: array expected"); - message.cloudControlDeployments = []; - for (var i = 0; i < object.cloudControlDeployments.length; ++i) { - if (typeof object.cloudControlDeployments[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse.cloudControlDeployments: object expected"); - message.cloudControlDeployments[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.fromObject(object.cloudControlDeployments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListCloudControlDeploymentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse} message ListCloudControlDeploymentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListCloudControlDeploymentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cloudControlDeployments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.cloudControlDeployments && message.cloudControlDeployments.length) { - object.cloudControlDeployments = []; - for (var j = 0; j < message.cloudControlDeployments.length; ++j) - object.cloudControlDeployments[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment.toObject(message.cloudControlDeployments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListCloudControlDeploymentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListCloudControlDeploymentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListCloudControlDeploymentsResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListCloudControlDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse"; - }; - - return ListCloudControlDeploymentsResponse; - })(); - - v1.CloudControlDeploymentReference = (function() { - - /** - * Properties of a CloudControlDeploymentReference. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlDeploymentReference - * @property {string|null} [cloudControlDeployment] CloudControlDeploymentReference cloudControlDeployment - */ - - /** - * Constructs a new CloudControlDeploymentReference. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlDeploymentReference. - * @implements ICloudControlDeploymentReference - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference=} [properties] Properties to set - */ - function CloudControlDeploymentReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlDeploymentReference cloudControlDeployment. - * @member {string} cloudControlDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @instance - */ - CloudControlDeploymentReference.prototype.cloudControlDeployment = ""; - - /** - * Creates a new CloudControlDeploymentReference instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference instance - */ - CloudControlDeploymentReference.create = function create(properties) { - return new CloudControlDeploymentReference(properties); - }; - - /** - * Encodes the specified CloudControlDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference} message CloudControlDeploymentReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlDeploymentReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudControlDeployment != null && Object.hasOwnProperty.call(message, "cloudControlDeployment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControlDeployment); - return writer; - }; - - /** - * Encodes the specified CloudControlDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlDeploymentReference} message CloudControlDeploymentReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlDeploymentReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlDeploymentReference message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlDeploymentReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.cloudControlDeployment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlDeploymentReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlDeploymentReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlDeploymentReference message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlDeploymentReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) - if (!$util.isString(message.cloudControlDeployment)) - return "cloudControlDeployment: string expected"; - return null; - }; - - /** - * Creates a CloudControlDeploymentReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} CloudControlDeploymentReference - */ - CloudControlDeploymentReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference(); - if (object.cloudControlDeployment != null) - message.cloudControlDeployment = String(object.cloudControlDeployment); - return message; - }; - - /** - * Creates a plain object from a CloudControlDeploymentReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference} message CloudControlDeploymentReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlDeploymentReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cloudControlDeployment = ""; - if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) - object.cloudControlDeployment = message.cloudControlDeployment; - return object; - }; - - /** - * Converts this CloudControlDeploymentReference to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @instance - * @returns {Object.} JSON object - */ - CloudControlDeploymentReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlDeploymentReference - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlDeploymentReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference"; - }; - - return CloudControlDeploymentReference; - })(); - - v1.FrameworkDeploymentReference = (function() { - - /** - * Properties of a FrameworkDeploymentReference. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFrameworkDeploymentReference - * @property {string|null} [frameworkDeployment] FrameworkDeploymentReference frameworkDeployment - * @property {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null} [frameworkReference] FrameworkDeploymentReference frameworkReference - * @property {string|null} [frameworkDisplayName] FrameworkDeploymentReference frameworkDisplayName - */ - - /** - * Constructs a new FrameworkDeploymentReference. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FrameworkDeploymentReference. - * @implements IFrameworkDeploymentReference - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference=} [properties] Properties to set - */ - function FrameworkDeploymentReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FrameworkDeploymentReference frameworkDeployment. - * @member {string} frameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @instance - */ - FrameworkDeploymentReference.prototype.frameworkDeployment = ""; - - /** - * FrameworkDeploymentReference frameworkReference. - * @member {google.cloud.cloudsecuritycompliance.v1.IFrameworkReference|null|undefined} frameworkReference - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @instance - */ - FrameworkDeploymentReference.prototype.frameworkReference = null; - - /** - * FrameworkDeploymentReference frameworkDisplayName. - * @member {string} frameworkDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @instance - */ - FrameworkDeploymentReference.prototype.frameworkDisplayName = ""; - - /** - * Creates a new FrameworkDeploymentReference instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference instance - */ - FrameworkDeploymentReference.create = function create(properties) { - return new FrameworkDeploymentReference(properties); - }; - - /** - * Encodes the specified FrameworkDeploymentReference message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference} message FrameworkDeploymentReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkDeploymentReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.frameworkDeployment != null && Object.hasOwnProperty.call(message, "frameworkDeployment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.frameworkDeployment); - if (message.frameworkReference != null && Object.hasOwnProperty.call(message, "frameworkReference")) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.encode(message.frameworkReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.frameworkDisplayName != null && Object.hasOwnProperty.call(message, "frameworkDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.frameworkDisplayName); - return writer; - }; - - /** - * Encodes the specified FrameworkDeploymentReference message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkDeploymentReference} message FrameworkDeploymentReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkDeploymentReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FrameworkDeploymentReference message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkDeploymentReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.frameworkDeployment = reader.string(); - break; - } - case 2: { - message.frameworkReference = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.decode(reader, reader.uint32()); - break; - } - case 3: { - message.frameworkDisplayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FrameworkDeploymentReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkDeploymentReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FrameworkDeploymentReference message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FrameworkDeploymentReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) - if (!$util.isString(message.frameworkDeployment)) - return "frameworkDeployment: string expected"; - if (message.frameworkReference != null && message.hasOwnProperty("frameworkReference")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.verify(message.frameworkReference); - if (error) - return "frameworkReference." + error; - } - if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) - if (!$util.isString(message.frameworkDisplayName)) - return "frameworkDisplayName: string expected"; - return null; - }; - - /** - * Creates a FrameworkDeploymentReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} FrameworkDeploymentReference - */ - FrameworkDeploymentReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference(); - if (object.frameworkDeployment != null) - message.frameworkDeployment = String(object.frameworkDeployment); - if (object.frameworkReference != null) { - if (typeof object.frameworkReference !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference.frameworkReference: object expected"); - message.frameworkReference = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.fromObject(object.frameworkReference); - } - if (object.frameworkDisplayName != null) - message.frameworkDisplayName = String(object.frameworkDisplayName); - return message; - }; - - /** - * Creates a plain object from a FrameworkDeploymentReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference} message FrameworkDeploymentReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameworkDeploymentReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.frameworkDeployment = ""; - object.frameworkReference = null; - object.frameworkDisplayName = ""; - } - if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) - object.frameworkDeployment = message.frameworkDeployment; - if (message.frameworkReference != null && message.hasOwnProperty("frameworkReference")) - object.frameworkReference = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkReference.toObject(message.frameworkReference, options); - if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) - object.frameworkDisplayName = message.frameworkDisplayName; - return object; - }; - - /** - * Converts this FrameworkDeploymentReference to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @instance - * @returns {Object.} JSON object - */ - FrameworkDeploymentReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FrameworkDeploymentReference - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FrameworkDeploymentReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference"; - }; - - return FrameworkDeploymentReference; - })(); - - v1.Monitoring = (function() { - - /** - * Constructs a new Monitoring service. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Monitoring - * @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 Monitoring(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Monitoring.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Monitoring; - - /** - * Creates new Monitoring service using the specified rpc implementation. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @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 {Monitoring} RPC service. Useful where requests and/or responses are streamed. - */ - Monitoring.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFrameworkComplianceSummaries}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @typedef ListFrameworkComplianceSummariesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} [response] ListFrameworkComplianceSummariesResponse - */ - - /** - * Calls ListFrameworkComplianceSummaries. - * @function listFrameworkComplianceSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} request ListFrameworkComplianceSummariesRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummariesCallback} callback Node-style callback called with the error, if any, and ListFrameworkComplianceSummariesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Monitoring.prototype.listFrameworkComplianceSummaries = function listFrameworkComplianceSummaries(request, callback) { - return this.rpcCall(listFrameworkComplianceSummaries, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse, request, callback); - }, "name", { value: "ListFrameworkComplianceSummaries" }); - - /** - * Calls ListFrameworkComplianceSummaries. - * @function listFrameworkComplianceSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} request ListFrameworkComplianceSummariesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listFindingSummaries}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @typedef ListFindingSummariesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} [response] ListFindingSummariesResponse - */ - - /** - * Calls ListFindingSummaries. - * @function listFindingSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} request ListFindingSummariesRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummariesCallback} callback Node-style callback called with the error, if any, and ListFindingSummariesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Monitoring.prototype.listFindingSummaries = function listFindingSummaries(request, callback) { - return this.rpcCall(listFindingSummaries, $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse, request, callback); - }, "name", { value: "ListFindingSummaries" }); - - /** - * Calls ListFindingSummaries. - * @function listFindingSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} request ListFindingSummariesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|fetchFrameworkComplianceReport}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @typedef FetchFrameworkComplianceReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} [response] FrameworkComplianceReport - */ - - /** - * Calls FetchFrameworkComplianceReport. - * @function fetchFrameworkComplianceReport - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} request FetchFrameworkComplianceReportRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReportCallback} callback Node-style callback called with the error, if any, and FrameworkComplianceReport - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Monitoring.prototype.fetchFrameworkComplianceReport = function fetchFrameworkComplianceReport(request, callback) { - return this.rpcCall(fetchFrameworkComplianceReport, $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest, $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport, request, callback); - }, "name", { value: "FetchFrameworkComplianceReport" }); - - /** - * Calls FetchFrameworkComplianceReport. - * @function fetchFrameworkComplianceReport - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} request FetchFrameworkComplianceReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|listControlComplianceSummaries}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @typedef ListControlComplianceSummariesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} [response] ListControlComplianceSummariesResponse - */ - - /** - * Calls ListControlComplianceSummaries. - * @function listControlComplianceSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} request ListControlComplianceSummariesRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummariesCallback} callback Node-style callback called with the error, if any, and ListControlComplianceSummariesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Monitoring.prototype.listControlComplianceSummaries = function listControlComplianceSummaries(request, callback) { - return this.rpcCall(listControlComplianceSummaries, $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest, $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse, request, callback); - }, "name", { value: "ListControlComplianceSummaries" }); - - /** - * Calls ListControlComplianceSummaries. - * @function listControlComplianceSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} request ListControlComplianceSummariesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.cloudsecuritycompliance.v1.Monitoring|aggregateFrameworkComplianceReport}. - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @typedef AggregateFrameworkComplianceReportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} [response] AggregateFrameworkComplianceReportResponse - */ - - /** - * Calls AggregateFrameworkComplianceReport. - * @function aggregateFrameworkComplianceReport - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} request AggregateFrameworkComplianceReportRequest message or plain object - * @param {google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReportCallback} callback Node-style callback called with the error, if any, and AggregateFrameworkComplianceReportResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Monitoring.prototype.aggregateFrameworkComplianceReport = function aggregateFrameworkComplianceReport(request, callback) { - return this.rpcCall(aggregateFrameworkComplianceReport, $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest, $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse, request, callback); - }, "name", { value: "AggregateFrameworkComplianceReport" }); - - /** - * Calls AggregateFrameworkComplianceReport. - * @function aggregateFrameworkComplianceReport - * @memberof google.cloud.cloudsecuritycompliance.v1.Monitoring - * @instance - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} request AggregateFrameworkComplianceReportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Monitoring; - })(); - - /** - * EvaluationState enum. - * @name google.cloud.cloudsecuritycompliance.v1.EvaluationState - * @enum {number} - * @property {number} EVALUATION_STATE_UNSPECIFIED=0 EVALUATION_STATE_UNSPECIFIED value - * @property {number} EVALUATION_STATE_PASSED=1 EVALUATION_STATE_PASSED value - * @property {number} EVALUATION_STATE_FAILED=2 EVALUATION_STATE_FAILED value - * @property {number} EVALUATION_STATE_NOT_ASSESSED=3 EVALUATION_STATE_NOT_ASSESSED value - */ - v1.EvaluationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVALUATION_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVALUATION_STATE_PASSED"] = 1; - values[valuesById[2] = "EVALUATION_STATE_FAILED"] = 2; - values[valuesById[3] = "EVALUATION_STATE_NOT_ASSESSED"] = 3; - return values; - })(); - - /** - * FindingClass enum. - * @name google.cloud.cloudsecuritycompliance.v1.FindingClass - * @enum {number} - * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value - * @property {number} THREAT=1 THREAT value - * @property {number} VULNERABILITY=2 VULNERABILITY value - * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value - * @property {number} OBSERVATION=4 OBSERVATION value - * @property {number} SCC_ERROR=5 SCC_ERROR value - * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value - * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value - * @property {number} SENSITIVE_DATA_RISK=8 SENSITIVE_DATA_RISK value - * @property {number} CHOKEPOINT=9 CHOKEPOINT value - */ - v1.FindingClass = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; - values[valuesById[1] = "THREAT"] = 1; - values[valuesById[2] = "VULNERABILITY"] = 2; - values[valuesById[3] = "MISCONFIGURATION"] = 3; - values[valuesById[4] = "OBSERVATION"] = 4; - values[valuesById[5] = "SCC_ERROR"] = 5; - values[valuesById[6] = "POSTURE_VIOLATION"] = 6; - values[valuesById[7] = "TOXIC_COMBINATION"] = 7; - values[valuesById[8] = "SENSITIVE_DATA_RISK"] = 8; - values[valuesById[9] = "CHOKEPOINT"] = 9; - return values; - })(); - - /** - * FrameworkComplianceSummaryView enum. - * @name google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView - * @enum {number} - * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED=0 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED value - * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC=1 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC value - * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL=2 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL value - */ - v1.FrameworkComplianceSummaryView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC"] = 1; - values[valuesById[2] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL"] = 2; - return values; - })(); - - v1.ListFrameworkComplianceSummariesRequest = (function() { - - /** - * Properties of a ListFrameworkComplianceSummariesRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworkComplianceSummariesRequest - * @property {string|null} [parent] ListFrameworkComplianceSummariesRequest parent - * @property {number|null} [pageSize] ListFrameworkComplianceSummariesRequest pageSize - * @property {string|null} [pageToken] ListFrameworkComplianceSummariesRequest pageToken - * @property {string|null} [filter] ListFrameworkComplianceSummariesRequest filter - * @property {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|null} [view] ListFrameworkComplianceSummariesRequest view - */ - - /** - * Constructs a new ListFrameworkComplianceSummariesRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworkComplianceSummariesRequest. - * @implements IListFrameworkComplianceSummariesRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest=} [properties] Properties to set - */ - function ListFrameworkComplianceSummariesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworkComplianceSummariesRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @instance - */ - ListFrameworkComplianceSummariesRequest.prototype.parent = ""; - - /** - * ListFrameworkComplianceSummariesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @instance - */ - ListFrameworkComplianceSummariesRequest.prototype.pageSize = 0; - - /** - * ListFrameworkComplianceSummariesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @instance - */ - ListFrameworkComplianceSummariesRequest.prototype.pageToken = ""; - - /** - * ListFrameworkComplianceSummariesRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @instance - */ - ListFrameworkComplianceSummariesRequest.prototype.filter = ""; - - /** - * ListFrameworkComplianceSummariesRequest view. - * @member {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} view - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @instance - */ - ListFrameworkComplianceSummariesRequest.prototype.view = 0; - - /** - * Creates a new ListFrameworkComplianceSummariesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest instance - */ - ListFrameworkComplianceSummariesRequest.create = function create(properties) { - return new ListFrameworkComplianceSummariesRequest(properties); - }; - - /** - * Encodes the specified ListFrameworkComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} message ListFrameworkComplianceSummariesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkComplianceSummariesRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); - return writer; - }; - - /** - * Encodes the specified ListFrameworkComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest} message ListFrameworkComplianceSummariesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkComplianceSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkComplianceSummariesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFrameworkComplianceSummariesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkComplianceSummariesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworkComplianceSummariesRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworkComplianceSummariesRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ListFrameworkComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} ListFrameworkComplianceSummariesRequest - */ - ListFrameworkComplianceSummariesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListFrameworkComplianceSummariesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest} message ListFrameworkComplianceSummariesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworkComplianceSummariesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.view = options.enums === String ? "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED" : 0; - } - 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.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView[message.view] === undefined ? message.view : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView[message.view] : message.view; - return object; - }; - - /** - * Converts this ListFrameworkComplianceSummariesRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @instance - * @returns {Object.} JSON object - */ - ListFrameworkComplianceSummariesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworkComplianceSummariesRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworkComplianceSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest"; - }; - - return ListFrameworkComplianceSummariesRequest; - })(); - - v1.ListFrameworkComplianceSummariesResponse = (function() { - - /** - * Properties of a ListFrameworkComplianceSummariesResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFrameworkComplianceSummariesResponse - * @property {Array.|null} [frameworkComplianceSummaries] ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries - * @property {string|null} [nextPageToken] ListFrameworkComplianceSummariesResponse nextPageToken - */ - - /** - * Constructs a new ListFrameworkComplianceSummariesResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFrameworkComplianceSummariesResponse. - * @implements IListFrameworkComplianceSummariesResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse=} [properties] Properties to set - */ - function ListFrameworkComplianceSummariesResponse(properties) { - this.frameworkComplianceSummaries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFrameworkComplianceSummariesResponse frameworkComplianceSummaries. - * @member {Array.} frameworkComplianceSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @instance - */ - ListFrameworkComplianceSummariesResponse.prototype.frameworkComplianceSummaries = $util.emptyArray; - - /** - * ListFrameworkComplianceSummariesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @instance - */ - ListFrameworkComplianceSummariesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListFrameworkComplianceSummariesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse instance - */ - ListFrameworkComplianceSummariesResponse.create = function create(properties) { - return new ListFrameworkComplianceSummariesResponse(properties); - }; - - /** - * Encodes the specified ListFrameworkComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse} message ListFrameworkComplianceSummariesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkComplianceSummariesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.frameworkComplianceSummaries != null && message.frameworkComplianceSummaries.length) - for (var i = 0; i < message.frameworkComplianceSummaries.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.encode(message.frameworkComplianceSummaries[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 ListFrameworkComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse} message ListFrameworkComplianceSummariesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFrameworkComplianceSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkComplianceSummariesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.frameworkComplianceSummaries && message.frameworkComplianceSummaries.length)) - message.frameworkComplianceSummaries = []; - message.frameworkComplianceSummaries.push($root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFrameworkComplianceSummariesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFrameworkComplianceSummariesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFrameworkComplianceSummariesResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFrameworkComplianceSummariesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.frameworkComplianceSummaries != null && message.hasOwnProperty("frameworkComplianceSummaries")) { - if (!Array.isArray(message.frameworkComplianceSummaries)) - return "frameworkComplianceSummaries: array expected"; - for (var i = 0; i < message.frameworkComplianceSummaries.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify(message.frameworkComplianceSummaries[i]); - if (error) - return "frameworkComplianceSummaries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListFrameworkComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} ListFrameworkComplianceSummariesResponse - */ - ListFrameworkComplianceSummariesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse(); - if (object.frameworkComplianceSummaries) { - if (!Array.isArray(object.frameworkComplianceSummaries)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.frameworkComplianceSummaries: array expected"); - message.frameworkComplianceSummaries = []; - for (var i = 0; i < object.frameworkComplianceSummaries.length; ++i) { - if (typeof object.frameworkComplianceSummaries[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse.frameworkComplianceSummaries: object expected"); - message.frameworkComplianceSummaries[i] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.fromObject(object.frameworkComplianceSummaries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListFrameworkComplianceSummariesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse} message ListFrameworkComplianceSummariesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFrameworkComplianceSummariesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.frameworkComplianceSummaries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.frameworkComplianceSummaries && message.frameworkComplianceSummaries.length) { - object.frameworkComplianceSummaries = []; - for (var j = 0; j < message.frameworkComplianceSummaries.length; ++j) - object.frameworkComplianceSummaries[j] = $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.toObject(message.frameworkComplianceSummaries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListFrameworkComplianceSummariesResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @instance - * @returns {Object.} JSON object - */ - ListFrameworkComplianceSummariesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFrameworkComplianceSummariesResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFrameworkComplianceSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse"; - }; - - return ListFrameworkComplianceSummariesResponse; - })(); - - v1.FrameworkComplianceReport = (function() { - - /** - * Properties of a FrameworkComplianceReport. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFrameworkComplianceReport - * @property {string|null} [framework] FrameworkComplianceReport framework - * @property {string|null} [frameworkDescription] FrameworkComplianceReport frameworkDescription - * @property {google.protobuf.ITimestamp|null} [updateTime] FrameworkComplianceReport updateTime - * @property {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null} [controlAssessmentDetails] FrameworkComplianceReport controlAssessmentDetails - * @property {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null} [frameworkType] FrameworkComplianceReport frameworkType - * @property {Array.|null} [supportedCloudProviders] FrameworkComplianceReport supportedCloudProviders - * @property {Array.|null} [frameworkCategories] FrameworkComplianceReport frameworkCategories - * @property {string|null} [frameworkDisplayName] FrameworkComplianceReport frameworkDisplayName - * @property {string|null} [name] FrameworkComplianceReport name - * @property {number|Long|null} [majorRevisionId] FrameworkComplianceReport majorRevisionId - * @property {number|Long|null} [minorRevisionId] FrameworkComplianceReport minorRevisionId - * @property {Array.|null} [targetResourceDetails] FrameworkComplianceReport targetResourceDetails - */ - - /** - * Constructs a new FrameworkComplianceReport. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FrameworkComplianceReport. - * @implements IFrameworkComplianceReport - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport=} [properties] Properties to set - */ - function FrameworkComplianceReport(properties) { - this.supportedCloudProviders = []; - this.frameworkCategories = []; - this.targetResourceDetails = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FrameworkComplianceReport framework. - * @member {string} framework - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.framework = ""; - - /** - * FrameworkComplianceReport frameworkDescription. - * @member {string} frameworkDescription - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.frameworkDescription = ""; - - /** - * FrameworkComplianceReport updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.updateTime = null; - - /** - * FrameworkComplianceReport controlAssessmentDetails. - * @member {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null|undefined} controlAssessmentDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.controlAssessmentDetails = null; - - /** - * FrameworkComplianceReport frameworkType. - * @member {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType} frameworkType - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.frameworkType = 0; - - /** - * FrameworkComplianceReport supportedCloudProviders. - * @member {Array.} supportedCloudProviders - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.supportedCloudProviders = $util.emptyArray; - - /** - * FrameworkComplianceReport frameworkCategories. - * @member {Array.} frameworkCategories - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.frameworkCategories = $util.emptyArray; - - /** - * FrameworkComplianceReport frameworkDisplayName. - * @member {string} frameworkDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.frameworkDisplayName = ""; - - /** - * FrameworkComplianceReport name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.name = ""; - - /** - * FrameworkComplianceReport majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * FrameworkComplianceReport minorRevisionId. - * @member {number|Long} minorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * FrameworkComplianceReport targetResourceDetails. - * @member {Array.} targetResourceDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - */ - FrameworkComplianceReport.prototype.targetResourceDetails = $util.emptyArray; - - /** - * Creates a new FrameworkComplianceReport instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport instance - */ - FrameworkComplianceReport.create = function create(properties) { - return new FrameworkComplianceReport(properties); - }; - - /** - * Encodes the specified FrameworkComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport} message FrameworkComplianceReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkComplianceReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); - if (message.frameworkDescription != null && Object.hasOwnProperty.call(message, "frameworkDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.frameworkDescription); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.controlAssessmentDetails != null && Object.hasOwnProperty.call(message, "controlAssessmentDetails")) - $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.encode(message.controlAssessmentDetails, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.frameworkType != null && Object.hasOwnProperty.call(message, "frameworkType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frameworkType); - if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - writer.int32(message.supportedCloudProviders[i]); - writer.ldelim(); - } - if (message.frameworkCategories != null && message.frameworkCategories.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.frameworkCategories.length; ++i) - writer.int32(message.frameworkCategories[i]); - writer.ldelim(); - } - if (message.frameworkDisplayName != null && Object.hasOwnProperty.call(message, "frameworkDisplayName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.frameworkDisplayName); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.name); - if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.majorRevisionId); - if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.minorRevisionId); - if (message.targetResourceDetails != null && message.targetResourceDetails.length) - for (var i = 0; i < message.targetResourceDetails.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.encode(message.targetResourceDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FrameworkComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport} message FrameworkComplianceReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkComplianceReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FrameworkComplianceReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkComplianceReport.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.framework = reader.string(); - break; - } - case 2: { - message.frameworkDescription = reader.string(); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.decode(reader, reader.uint32()); - break; - } - case 5: { - message.frameworkType = reader.int32(); - break; - } - case 6: { - if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) - message.supportedCloudProviders = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedCloudProviders.push(reader.int32()); - } else - message.supportedCloudProviders.push(reader.int32()); - break; - } - case 7: { - if (!(message.frameworkCategories && message.frameworkCategories.length)) - message.frameworkCategories = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.frameworkCategories.push(reader.int32()); - } else - message.frameworkCategories.push(reader.int32()); - break; - } - case 8: { - message.frameworkDisplayName = reader.string(); - break; - } - case 9: { - message.name = reader.string(); - break; - } - case 10: { - message.majorRevisionId = reader.int64(); - break; - } - case 11: { - message.minorRevisionId = reader.int64(); - break; - } - case 12: { - if (!(message.targetResourceDetails && message.targetResourceDetails.length)) - message.targetResourceDetails = []; - message.targetResourceDetails.push($root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FrameworkComplianceReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkComplianceReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FrameworkComplianceReport message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FrameworkComplianceReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.framework != null && message.hasOwnProperty("framework")) - if (!$util.isString(message.framework)) - return "framework: string expected"; - if (message.frameworkDescription != null && message.hasOwnProperty("frameworkDescription")) - if (!$util.isString(message.frameworkDescription)) - return "frameworkDescription: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify(message.controlAssessmentDetails); - if (error) - return "controlAssessmentDetails." + error; - } - if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) - switch (message.frameworkType) { - default: - return "frameworkType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { - if (!Array.isArray(message.supportedCloudProviders)) - return "supportedCloudProviders: array expected"; - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - switch (message.supportedCloudProviders[i]) { - default: - return "supportedCloudProviders: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.frameworkCategories != null && message.hasOwnProperty("frameworkCategories")) { - if (!Array.isArray(message.frameworkCategories)) - return "frameworkCategories: array expected"; - for (var i = 0; i < message.frameworkCategories.length; ++i) - switch (message.frameworkCategories[i]) { - default: - return "frameworkCategories: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) - if (!$util.isString(message.frameworkDisplayName)) - return "frameworkDisplayName: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) - return "minorRevisionId: integer|Long expected"; - if (message.targetResourceDetails != null && message.hasOwnProperty("targetResourceDetails")) { - if (!Array.isArray(message.targetResourceDetails)) - return "targetResourceDetails: array expected"; - for (var i = 0; i < message.targetResourceDetails.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify(message.targetResourceDetails[i]); - if (error) - return "targetResourceDetails." + error; - } - } - return null; - }; - - /** - * Creates a FrameworkComplianceReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} FrameworkComplianceReport - */ - FrameworkComplianceReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport(); - if (object.framework != null) - message.framework = String(object.framework); - if (object.frameworkDescription != null) - message.frameworkDescription = String(object.frameworkDescription); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.controlAssessmentDetails != null) { - if (typeof object.controlAssessmentDetails !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.controlAssessmentDetails: object expected"); - message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.fromObject(object.controlAssessmentDetails); - } - switch (object.frameworkType) { - default: - if (typeof object.frameworkType === "number") { - message.frameworkType = object.frameworkType; - break; - } - break; - case "FRAMEWORK_TYPE_UNSPECIFIED": - case 0: - message.frameworkType = 0; - break; - case "BUILT_IN": - case 1: - message.frameworkType = 1; - break; - case "CUSTOM": - case 2: - message.frameworkType = 2; - break; - } - if (object.supportedCloudProviders) { - if (!Array.isArray(object.supportedCloudProviders)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.supportedCloudProviders: array expected"); - message.supportedCloudProviders = []; - for (var i = 0; i < object.supportedCloudProviders.length; ++i) - switch (object.supportedCloudProviders[i]) { - default: - if (typeof object.supportedCloudProviders[i] === "number") { - message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; - break; - } - case "CLOUD_PROVIDER_UNSPECIFIED": - case 0: - message.supportedCloudProviders[i] = 0; - break; - case "AWS": - case 1: - message.supportedCloudProviders[i] = 1; - break; - case "AZURE": - case 2: - message.supportedCloudProviders[i] = 2; - break; - case "GCP": - case 3: - message.supportedCloudProviders[i] = 3; - break; - } - } - if (object.frameworkCategories) { - if (!Array.isArray(object.frameworkCategories)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.frameworkCategories: array expected"); - message.frameworkCategories = []; - for (var i = 0; i < object.frameworkCategories.length; ++i) - switch (object.frameworkCategories[i]) { - default: - if (typeof object.frameworkCategories[i] === "number") { - message.frameworkCategories[i] = object.frameworkCategories[i]; - break; - } - case "FRAMEWORK_CATEGORY_UNSPECIFIED": - case 0: - message.frameworkCategories[i] = 0; - break; - case "INDUSTRY_DEFINED_STANDARD": - case 1: - message.frameworkCategories[i] = 1; - break; - case "ASSURED_WORKLOADS": - case 2: - message.frameworkCategories[i] = 2; - break; - case "DATA_SECURITY": - case 3: - message.frameworkCategories[i] = 3; - break; - case "GOOGLE_BEST_PRACTICES": - case 4: - message.frameworkCategories[i] = 4; - break; - case "CUSTOM_FRAMEWORK": - case 5: - message.frameworkCategories[i] = 5; - break; - } - } - if (object.frameworkDisplayName != null) - message.frameworkDisplayName = String(object.frameworkDisplayName); - if (object.name != null) - message.name = String(object.name); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - if (object.minorRevisionId != null) - if ($util.Long) - (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; - else if (typeof object.minorRevisionId === "string") - message.minorRevisionId = parseInt(object.minorRevisionId, 10); - else if (typeof object.minorRevisionId === "number") - message.minorRevisionId = object.minorRevisionId; - else if (typeof object.minorRevisionId === "object") - message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); - if (object.targetResourceDetails) { - if (!Array.isArray(object.targetResourceDetails)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.targetResourceDetails: array expected"); - message.targetResourceDetails = []; - for (var i = 0; i < object.targetResourceDetails.length; ++i) { - if (typeof object.targetResourceDetails[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport.targetResourceDetails: object expected"); - message.targetResourceDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.fromObject(object.targetResourceDetails[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FrameworkComplianceReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport} message FrameworkComplianceReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameworkComplianceReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.supportedCloudProviders = []; - object.frameworkCategories = []; - object.targetResourceDetails = []; - } - if (options.defaults) { - object.framework = ""; - object.frameworkDescription = ""; - object.updateTime = null; - object.controlAssessmentDetails = null; - object.frameworkType = options.enums === String ? "FRAMEWORK_TYPE_UNSPECIFIED" : 0; - object.frameworkDisplayName = ""; - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.minorRevisionId = options.longs === String ? "0" : 0; - } - if (message.framework != null && message.hasOwnProperty("framework")) - object.framework = message.framework; - if (message.frameworkDescription != null && message.hasOwnProperty("frameworkDescription")) - object.frameworkDescription = message.frameworkDescription; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) - object.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.toObject(message.controlAssessmentDetails, options); - if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) - object.frameworkType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] === undefined ? message.frameworkType : $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] : message.frameworkType; - if (message.supportedCloudProviders && message.supportedCloudProviders.length) { - object.supportedCloudProviders = []; - for (var j = 0; j < message.supportedCloudProviders.length; ++j) - object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; - } - if (message.frameworkCategories && message.frameworkCategories.length) { - object.frameworkCategories = []; - for (var j = 0; j < message.frameworkCategories.length; ++j) - object.frameworkCategories[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] === undefined ? message.frameworkCategories[j] : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] : message.frameworkCategories[j]; - } - if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) - object.frameworkDisplayName = message.frameworkDisplayName; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (typeof message.minorRevisionId === "number") - object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; - else - object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; - if (message.targetResourceDetails && message.targetResourceDetails.length) { - object.targetResourceDetails = []; - for (var j = 0; j < message.targetResourceDetails.length; ++j) - object.targetResourceDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.toObject(message.targetResourceDetails[j], options); - } - return object; - }; - - /** - * Converts this FrameworkComplianceReport to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @instance - * @returns {Object.} JSON object - */ - FrameworkComplianceReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FrameworkComplianceReport - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FrameworkComplianceReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport"; - }; - - return FrameworkComplianceReport; - })(); - - v1.FetchFrameworkComplianceReportRequest = (function() { - - /** - * Properties of a FetchFrameworkComplianceReportRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFetchFrameworkComplianceReportRequest - * @property {string|null} [name] FetchFrameworkComplianceReportRequest name - * @property {google.protobuf.ITimestamp|null} [endTime] FetchFrameworkComplianceReportRequest endTime - * @property {string|null} [filter] FetchFrameworkComplianceReportRequest filter - */ - - /** - * Constructs a new FetchFrameworkComplianceReportRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FetchFrameworkComplianceReportRequest. - * @implements IFetchFrameworkComplianceReportRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest=} [properties] Properties to set - */ - function FetchFrameworkComplianceReportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchFrameworkComplianceReportRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @instance - */ - FetchFrameworkComplianceReportRequest.prototype.name = ""; - - /** - * FetchFrameworkComplianceReportRequest endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @instance - */ - FetchFrameworkComplianceReportRequest.prototype.endTime = null; - - /** - * FetchFrameworkComplianceReportRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @instance - */ - FetchFrameworkComplianceReportRequest.prototype.filter = ""; - - /** - * Creates a new FetchFrameworkComplianceReportRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest instance - */ - FetchFrameworkComplianceReportRequest.create = function create(properties) { - return new FetchFrameworkComplianceReportRequest(properties); - }; - - /** - * Encodes the specified FetchFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} message FetchFrameworkComplianceReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchFrameworkComplianceReportRequest.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.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - return writer; - }; - - /** - * Encodes the specified FetchFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest} message FetchFrameworkComplianceReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchFrameworkComplianceReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchFrameworkComplianceReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchFrameworkComplianceReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchFrameworkComplianceReportRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchFrameworkComplianceReportRequest.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.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a FetchFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} FetchFrameworkComplianceReportRequest - */ - FetchFrameworkComplianceReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a FetchFrameworkComplianceReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest} message FetchFrameworkComplianceReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchFrameworkComplianceReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.endTime = null; - object.filter = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this FetchFrameworkComplianceReportRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @instance - * @returns {Object.} JSON object - */ - FetchFrameworkComplianceReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchFrameworkComplianceReportRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchFrameworkComplianceReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest"; - }; - - return FetchFrameworkComplianceReportRequest; - })(); - - v1.ListFindingSummariesRequest = (function() { - - /** - * Properties of a ListFindingSummariesRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFindingSummariesRequest - * @property {string|null} [parent] ListFindingSummariesRequest parent - * @property {number|null} [pageSize] ListFindingSummariesRequest pageSize - * @property {string|null} [pageToken] ListFindingSummariesRequest pageToken - * @property {string|null} [filter] ListFindingSummariesRequest filter - * @property {google.protobuf.ITimestamp|null} [endTime] ListFindingSummariesRequest endTime - */ - - /** - * Constructs a new ListFindingSummariesRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFindingSummariesRequest. - * @implements IListFindingSummariesRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest=} [properties] Properties to set - */ - function ListFindingSummariesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFindingSummariesRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @instance - */ - ListFindingSummariesRequest.prototype.parent = ""; - - /** - * ListFindingSummariesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @instance - */ - ListFindingSummariesRequest.prototype.pageSize = 0; - - /** - * ListFindingSummariesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @instance - */ - ListFindingSummariesRequest.prototype.pageToken = ""; - - /** - * ListFindingSummariesRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @instance - */ - ListFindingSummariesRequest.prototype.filter = ""; - - /** - * ListFindingSummariesRequest endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @instance - */ - ListFindingSummariesRequest.prototype.endTime = null; - - /** - * Creates a new ListFindingSummariesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest instance - */ - ListFindingSummariesRequest.create = function create(properties) { - return new ListFindingSummariesRequest(properties); - }; - - /** - * Encodes the specified ListFindingSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} message ListFindingSummariesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingSummariesRequest.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.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListFindingSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest} message ListFindingSummariesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFindingSummariesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingSummariesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFindingSummariesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingSummariesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFindingSummariesRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFindingSummariesRequest.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.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - return null; - }; - - /** - * Creates a ListFindingSummariesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} ListFindingSummariesRequest - */ - ListFindingSummariesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest(); - 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.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from a ListFindingSummariesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest} message ListFindingSummariesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFindingSummariesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.endTime = null; - } - 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.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - return object; - }; - - /** - * Converts this ListFindingSummariesRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @instance - * @returns {Object.} JSON object - */ - ListFindingSummariesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFindingSummariesRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFindingSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest"; - }; - - return ListFindingSummariesRequest; - })(); - - v1.ListFindingSummariesResponse = (function() { - - /** - * Properties of a ListFindingSummariesResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListFindingSummariesResponse - * @property {Array.|null} [findingSummaries] ListFindingSummariesResponse findingSummaries - * @property {string|null} [nextPageToken] ListFindingSummariesResponse nextPageToken - */ - - /** - * Constructs a new ListFindingSummariesResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListFindingSummariesResponse. - * @implements IListFindingSummariesResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse=} [properties] Properties to set - */ - function ListFindingSummariesResponse(properties) { - this.findingSummaries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListFindingSummariesResponse findingSummaries. - * @member {Array.} findingSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @instance - */ - ListFindingSummariesResponse.prototype.findingSummaries = $util.emptyArray; - - /** - * ListFindingSummariesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @instance - */ - ListFindingSummariesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListFindingSummariesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse instance - */ - ListFindingSummariesResponse.create = function create(properties) { - return new ListFindingSummariesResponse(properties); - }; - - /** - * Encodes the specified ListFindingSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse} message ListFindingSummariesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingSummariesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.findingSummaries != null && message.findingSummaries.length) - for (var i = 0; i < message.findingSummaries.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.encode(message.findingSummaries[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 ListFindingSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse} message ListFindingSummariesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFindingSummariesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingSummariesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.findingSummaries && message.findingSummaries.length)) - message.findingSummaries = []; - message.findingSummaries.push($root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFindingSummariesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingSummariesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFindingSummariesResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFindingSummariesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.findingSummaries != null && message.hasOwnProperty("findingSummaries")) { - if (!Array.isArray(message.findingSummaries)) - return "findingSummaries: array expected"; - for (var i = 0; i < message.findingSummaries.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify(message.findingSummaries[i]); - if (error) - return "findingSummaries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListFindingSummariesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} ListFindingSummariesResponse - */ - ListFindingSummariesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse(); - if (object.findingSummaries) { - if (!Array.isArray(object.findingSummaries)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.findingSummaries: array expected"); - message.findingSummaries = []; - for (var i = 0; i < object.findingSummaries.length; ++i) { - if (typeof object.findingSummaries[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse.findingSummaries: object expected"); - message.findingSummaries[i] = $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.fromObject(object.findingSummaries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListFindingSummariesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse} message ListFindingSummariesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFindingSummariesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.findingSummaries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.findingSummaries && message.findingSummaries.length) { - object.findingSummaries = []; - for (var j = 0; j < message.findingSummaries.length; ++j) - object.findingSummaries[j] = $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary.toObject(message.findingSummaries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListFindingSummariesResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @instance - * @returns {Object.} JSON object - */ - ListFindingSummariesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListFindingSummariesResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFindingSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse"; - }; - - return ListFindingSummariesResponse; - })(); - - v1.ListControlComplianceSummariesRequest = (function() { - - /** - * Properties of a ListControlComplianceSummariesRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListControlComplianceSummariesRequest - * @property {string|null} [parent] ListControlComplianceSummariesRequest parent - * @property {google.protobuf.ITimestamp|null} [endTime] ListControlComplianceSummariesRequest endTime - * @property {number|null} [pageSize] ListControlComplianceSummariesRequest pageSize - * @property {string|null} [pageToken] ListControlComplianceSummariesRequest pageToken - * @property {string|null} [filter] ListControlComplianceSummariesRequest filter - */ - - /** - * Constructs a new ListControlComplianceSummariesRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListControlComplianceSummariesRequest. - * @implements IListControlComplianceSummariesRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest=} [properties] Properties to set - */ - function ListControlComplianceSummariesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListControlComplianceSummariesRequest parent. - * @member {string} parent - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @instance - */ - ListControlComplianceSummariesRequest.prototype.parent = ""; - - /** - * ListControlComplianceSummariesRequest endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @instance - */ - ListControlComplianceSummariesRequest.prototype.endTime = null; - - /** - * ListControlComplianceSummariesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @instance - */ - ListControlComplianceSummariesRequest.prototype.pageSize = 0; - - /** - * ListControlComplianceSummariesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @instance - */ - ListControlComplianceSummariesRequest.prototype.pageToken = ""; - - /** - * ListControlComplianceSummariesRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @instance - */ - ListControlComplianceSummariesRequest.prototype.filter = ""; - - /** - * Creates a new ListControlComplianceSummariesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest instance - */ - ListControlComplianceSummariesRequest.create = function create(properties) { - return new ListControlComplianceSummariesRequest(properties); - }; - - /** - * Encodes the specified ListControlComplianceSummariesRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} message ListControlComplianceSummariesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListControlComplianceSummariesRequest.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.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListControlComplianceSummariesRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest} message ListControlComplianceSummariesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListControlComplianceSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListControlComplianceSummariesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListControlComplianceSummariesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListControlComplianceSummariesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListControlComplianceSummariesRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListControlComplianceSummariesRequest.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.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListControlComplianceSummariesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} ListControlComplianceSummariesRequest - */ - ListControlComplianceSummariesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListControlComplianceSummariesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest} message ListControlComplianceSummariesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListControlComplianceSummariesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.endTime = null; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListControlComplianceSummariesRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @instance - * @returns {Object.} JSON object - */ - ListControlComplianceSummariesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListControlComplianceSummariesRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListControlComplianceSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest"; - }; - - return ListControlComplianceSummariesRequest; - })(); - - v1.ListControlComplianceSummariesResponse = (function() { - - /** - * Properties of a ListControlComplianceSummariesResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IListControlComplianceSummariesResponse - * @property {Array.|null} [controlComplianceSummaries] ListControlComplianceSummariesResponse controlComplianceSummaries - * @property {string|null} [nextPageToken] ListControlComplianceSummariesResponse nextPageToken - */ - - /** - * Constructs a new ListControlComplianceSummariesResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ListControlComplianceSummariesResponse. - * @implements IListControlComplianceSummariesResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse=} [properties] Properties to set - */ - function ListControlComplianceSummariesResponse(properties) { - this.controlComplianceSummaries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListControlComplianceSummariesResponse controlComplianceSummaries. - * @member {Array.} controlComplianceSummaries - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @instance - */ - ListControlComplianceSummariesResponse.prototype.controlComplianceSummaries = $util.emptyArray; - - /** - * ListControlComplianceSummariesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @instance - */ - ListControlComplianceSummariesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListControlComplianceSummariesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse instance - */ - ListControlComplianceSummariesResponse.create = function create(properties) { - return new ListControlComplianceSummariesResponse(properties); - }; - - /** - * Encodes the specified ListControlComplianceSummariesResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse} message ListControlComplianceSummariesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListControlComplianceSummariesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.controlComplianceSummaries != null && message.controlComplianceSummaries.length) - for (var i = 0; i < message.controlComplianceSummaries.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.encode(message.controlComplianceSummaries[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 ListControlComplianceSummariesResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse} message ListControlComplianceSummariesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListControlComplianceSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListControlComplianceSummariesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.controlComplianceSummaries && message.controlComplianceSummaries.length)) - message.controlComplianceSummaries = []; - message.controlComplianceSummaries.push($root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListControlComplianceSummariesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListControlComplianceSummariesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListControlComplianceSummariesResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListControlComplianceSummariesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.controlComplianceSummaries != null && message.hasOwnProperty("controlComplianceSummaries")) { - if (!Array.isArray(message.controlComplianceSummaries)) - return "controlComplianceSummaries: array expected"; - for (var i = 0; i < message.controlComplianceSummaries.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify(message.controlComplianceSummaries[i]); - if (error) - return "controlComplianceSummaries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListControlComplianceSummariesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} ListControlComplianceSummariesResponse - */ - ListControlComplianceSummariesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse(); - if (object.controlComplianceSummaries) { - if (!Array.isArray(object.controlComplianceSummaries)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.controlComplianceSummaries: array expected"); - message.controlComplianceSummaries = []; - for (var i = 0; i < object.controlComplianceSummaries.length; ++i) { - if (typeof object.controlComplianceSummaries[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse.controlComplianceSummaries: object expected"); - message.controlComplianceSummaries[i] = $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.fromObject(object.controlComplianceSummaries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListControlComplianceSummariesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse} message ListControlComplianceSummariesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListControlComplianceSummariesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.controlComplianceSummaries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.controlComplianceSummaries && message.controlComplianceSummaries.length) { - object.controlComplianceSummaries = []; - for (var j = 0; j < message.controlComplianceSummaries.length; ++j) - object.controlComplianceSummaries[j] = $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.toObject(message.controlComplianceSummaries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListControlComplianceSummariesResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @instance - * @returns {Object.} JSON object - */ - ListControlComplianceSummariesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListControlComplianceSummariesResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListControlComplianceSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse"; - }; - - return ListControlComplianceSummariesResponse; - })(); - - v1.AggregateFrameworkComplianceReportRequest = (function() { - - /** - * Properties of an AggregateFrameworkComplianceReportRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IAggregateFrameworkComplianceReportRequest - * @property {string|null} [name] AggregateFrameworkComplianceReportRequest name - * @property {google.type.IInterval|null} [interval] AggregateFrameworkComplianceReportRequest interval - * @property {string|null} [filter] AggregateFrameworkComplianceReportRequest filter - */ - - /** - * Constructs a new AggregateFrameworkComplianceReportRequest. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an AggregateFrameworkComplianceReportRequest. - * @implements IAggregateFrameworkComplianceReportRequest - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest=} [properties] Properties to set - */ - function AggregateFrameworkComplianceReportRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AggregateFrameworkComplianceReportRequest name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @instance - */ - AggregateFrameworkComplianceReportRequest.prototype.name = ""; - - /** - * AggregateFrameworkComplianceReportRequest interval. - * @member {google.type.IInterval|null|undefined} interval - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @instance - */ - AggregateFrameworkComplianceReportRequest.prototype.interval = null; - - /** - * AggregateFrameworkComplianceReportRequest filter. - * @member {string} filter - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @instance - */ - AggregateFrameworkComplianceReportRequest.prototype.filter = ""; - - /** - * Creates a new AggregateFrameworkComplianceReportRequest instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest instance - */ - AggregateFrameworkComplianceReportRequest.create = function create(properties) { - return new AggregateFrameworkComplianceReportRequest(properties); - }; - - /** - * Encodes the specified AggregateFrameworkComplianceReportRequest message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} message AggregateFrameworkComplianceReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregateFrameworkComplianceReportRequest.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.interval != null && Object.hasOwnProperty.call(message, "interval")) - $root.google.type.Interval.encode(message.interval, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - return writer; - }; - - /** - * Encodes the specified AggregateFrameworkComplianceReportRequest message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest} message AggregateFrameworkComplianceReportRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregateFrameworkComplianceReportRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregateFrameworkComplianceReportRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.interval = $root.google.type.Interval.decode(reader, reader.uint32()); - break; - } - case 3: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AggregateFrameworkComplianceReportRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregateFrameworkComplianceReportRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AggregateFrameworkComplianceReportRequest message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AggregateFrameworkComplianceReportRequest.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.interval != null && message.hasOwnProperty("interval")) { - var error = $root.google.type.Interval.verify(message.interval); - if (error) - return "interval." + error; - } - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates an AggregateFrameworkComplianceReportRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} AggregateFrameworkComplianceReportRequest - */ - AggregateFrameworkComplianceReportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest.interval: object expected"); - message.interval = $root.google.type.Interval.fromObject(object.interval); - } - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from an AggregateFrameworkComplianceReportRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest} message AggregateFrameworkComplianceReportRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AggregateFrameworkComplianceReportRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.interval = null; - object.filter = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.interval != null && message.hasOwnProperty("interval")) - object.interval = $root.google.type.Interval.toObject(message.interval, options); - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this AggregateFrameworkComplianceReportRequest to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @instance - * @returns {Object.} JSON object - */ - AggregateFrameworkComplianceReportRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AggregateFrameworkComplianceReportRequest - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AggregateFrameworkComplianceReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest"; - }; - - return AggregateFrameworkComplianceReportRequest; - })(); - - v1.AggregateFrameworkComplianceReportResponse = (function() { - - /** - * Properties of an AggregateFrameworkComplianceReportResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IAggregateFrameworkComplianceReportResponse - * @property {Array.|null} [aggregatedComplianceReports] AggregateFrameworkComplianceReportResponse aggregatedComplianceReports - */ - - /** - * Constructs a new AggregateFrameworkComplianceReportResponse. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an AggregateFrameworkComplianceReportResponse. - * @implements IAggregateFrameworkComplianceReportResponse - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse=} [properties] Properties to set - */ - function AggregateFrameworkComplianceReportResponse(properties) { - this.aggregatedComplianceReports = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AggregateFrameworkComplianceReportResponse aggregatedComplianceReports. - * @member {Array.} aggregatedComplianceReports - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @instance - */ - AggregateFrameworkComplianceReportResponse.prototype.aggregatedComplianceReports = $util.emptyArray; - - /** - * Creates a new AggregateFrameworkComplianceReportResponse instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse instance - */ - AggregateFrameworkComplianceReportResponse.create = function create(properties) { - return new AggregateFrameworkComplianceReportResponse(properties); - }; - - /** - * Encodes the specified AggregateFrameworkComplianceReportResponse message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse} message AggregateFrameworkComplianceReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregateFrameworkComplianceReportResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.aggregatedComplianceReports != null && message.aggregatedComplianceReports.length) - for (var i = 0; i < message.aggregatedComplianceReports.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.encode(message.aggregatedComplianceReports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AggregateFrameworkComplianceReportResponse message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse} message AggregateFrameworkComplianceReportResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregateFrameworkComplianceReportResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregateFrameworkComplianceReportResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.aggregatedComplianceReports && message.aggregatedComplianceReports.length)) - message.aggregatedComplianceReports = []; - message.aggregatedComplianceReports.push($root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AggregateFrameworkComplianceReportResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregateFrameworkComplianceReportResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AggregateFrameworkComplianceReportResponse message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AggregateFrameworkComplianceReportResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.aggregatedComplianceReports != null && message.hasOwnProperty("aggregatedComplianceReports")) { - if (!Array.isArray(message.aggregatedComplianceReports)) - return "aggregatedComplianceReports: array expected"; - for (var i = 0; i < message.aggregatedComplianceReports.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify(message.aggregatedComplianceReports[i]); - if (error) - return "aggregatedComplianceReports." + error; - } - } - return null; - }; - - /** - * Creates an AggregateFrameworkComplianceReportResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} AggregateFrameworkComplianceReportResponse - */ - AggregateFrameworkComplianceReportResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse(); - if (object.aggregatedComplianceReports) { - if (!Array.isArray(object.aggregatedComplianceReports)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.aggregatedComplianceReports: array expected"); - message.aggregatedComplianceReports = []; - for (var i = 0; i < object.aggregatedComplianceReports.length; ++i) { - if (typeof object.aggregatedComplianceReports[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse.aggregatedComplianceReports: object expected"); - message.aggregatedComplianceReports[i] = $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.fromObject(object.aggregatedComplianceReports[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AggregateFrameworkComplianceReportResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse} message AggregateFrameworkComplianceReportResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AggregateFrameworkComplianceReportResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.aggregatedComplianceReports = []; - if (message.aggregatedComplianceReports && message.aggregatedComplianceReports.length) { - object.aggregatedComplianceReports = []; - for (var j = 0; j < message.aggregatedComplianceReports.length; ++j) - object.aggregatedComplianceReports[j] = $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.toObject(message.aggregatedComplianceReports[j], options); - } - return object; - }; - - /** - * Converts this AggregateFrameworkComplianceReportResponse to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @instance - * @returns {Object.} JSON object - */ - AggregateFrameworkComplianceReportResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AggregateFrameworkComplianceReportResponse - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AggregateFrameworkComplianceReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse"; - }; - - return AggregateFrameworkComplianceReportResponse; - })(); - - v1.ControlAssessmentDetails = (function() { - - /** - * Properties of a ControlAssessmentDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IControlAssessmentDetails - * @property {number|null} [passingControls] ControlAssessmentDetails passingControls - * @property {number|null} [failingControls] ControlAssessmentDetails failingControls - * @property {number|null} [assessedPassingControls] ControlAssessmentDetails assessedPassingControls - * @property {number|null} [notAssessedControls] ControlAssessmentDetails notAssessedControls - */ - - /** - * Constructs a new ControlAssessmentDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ControlAssessmentDetails. - * @implements IControlAssessmentDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails=} [properties] Properties to set - */ - function ControlAssessmentDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ControlAssessmentDetails passingControls. - * @member {number} passingControls - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @instance - */ - ControlAssessmentDetails.prototype.passingControls = 0; - - /** - * ControlAssessmentDetails failingControls. - * @member {number} failingControls - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @instance - */ - ControlAssessmentDetails.prototype.failingControls = 0; - - /** - * ControlAssessmentDetails assessedPassingControls. - * @member {number} assessedPassingControls - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @instance - */ - ControlAssessmentDetails.prototype.assessedPassingControls = 0; - - /** - * ControlAssessmentDetails notAssessedControls. - * @member {number} notAssessedControls - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @instance - */ - ControlAssessmentDetails.prototype.notAssessedControls = 0; - - /** - * Creates a new ControlAssessmentDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails instance - */ - ControlAssessmentDetails.create = function create(properties) { - return new ControlAssessmentDetails(properties); - }; - - /** - * Encodes the specified ControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails} message ControlAssessmentDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlAssessmentDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.passingControls != null && Object.hasOwnProperty.call(message, "passingControls")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.passingControls); - if (message.failingControls != null && Object.hasOwnProperty.call(message, "failingControls")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failingControls); - if (message.assessedPassingControls != null && Object.hasOwnProperty.call(message, "assessedPassingControls")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.assessedPassingControls); - if (message.notAssessedControls != null && Object.hasOwnProperty.call(message, "notAssessedControls")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.notAssessedControls); - return writer; - }; - - /** - * Encodes the specified ControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails} message ControlAssessmentDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlAssessmentDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ControlAssessmentDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlAssessmentDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.passingControls = reader.int32(); - break; - } - case 2: { - message.failingControls = reader.int32(); - break; - } - case 3: { - message.assessedPassingControls = reader.int32(); - break; - } - case 4: { - message.notAssessedControls = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ControlAssessmentDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlAssessmentDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ControlAssessmentDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ControlAssessmentDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.passingControls != null && message.hasOwnProperty("passingControls")) - if (!$util.isInteger(message.passingControls)) - return "passingControls: integer expected"; - if (message.failingControls != null && message.hasOwnProperty("failingControls")) - if (!$util.isInteger(message.failingControls)) - return "failingControls: integer expected"; - if (message.assessedPassingControls != null && message.hasOwnProperty("assessedPassingControls")) - if (!$util.isInteger(message.assessedPassingControls)) - return "assessedPassingControls: integer expected"; - if (message.notAssessedControls != null && message.hasOwnProperty("notAssessedControls")) - if (!$util.isInteger(message.notAssessedControls)) - return "notAssessedControls: integer expected"; - return null; - }; - - /** - * Creates a ControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} ControlAssessmentDetails - */ - ControlAssessmentDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails(); - if (object.passingControls != null) - message.passingControls = object.passingControls | 0; - if (object.failingControls != null) - message.failingControls = object.failingControls | 0; - if (object.assessedPassingControls != null) - message.assessedPassingControls = object.assessedPassingControls | 0; - if (object.notAssessedControls != null) - message.notAssessedControls = object.notAssessedControls | 0; - return message; - }; - - /** - * Creates a plain object from a ControlAssessmentDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails} message ControlAssessmentDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ControlAssessmentDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.passingControls = 0; - object.failingControls = 0; - object.assessedPassingControls = 0; - object.notAssessedControls = 0; - } - if (message.passingControls != null && message.hasOwnProperty("passingControls")) - object.passingControls = message.passingControls; - if (message.failingControls != null && message.hasOwnProperty("failingControls")) - object.failingControls = message.failingControls; - if (message.assessedPassingControls != null && message.hasOwnProperty("assessedPassingControls")) - object.assessedPassingControls = message.assessedPassingControls; - if (message.notAssessedControls != null && message.hasOwnProperty("notAssessedControls")) - object.notAssessedControls = message.notAssessedControls; - return object; - }; - - /** - * Converts this ControlAssessmentDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @instance - * @returns {Object.} JSON object - */ - ControlAssessmentDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ControlAssessmentDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ControlAssessmentDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails"; - }; - - return ControlAssessmentDetails; - })(); - - v1.FrameworkComplianceSummary = (function() { - - /** - * Properties of a FrameworkComplianceSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFrameworkComplianceSummary - * @property {string|null} [framework] FrameworkComplianceSummary framework - * @property {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null} [controlAssessmentDetails] FrameworkComplianceSummary controlAssessmentDetails - * @property {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType|null} [frameworkType] FrameworkComplianceSummary frameworkType - * @property {Array.|null} [supportedCloudProviders] FrameworkComplianceSummary supportedCloudProviders - * @property {Array.|null} [frameworkCategories] FrameworkComplianceSummary frameworkCategories - * @property {string|null} [frameworkDisplayName] FrameworkComplianceSummary frameworkDisplayName - * @property {string|null} [name] FrameworkComplianceSummary name - * @property {number|Long|null} [majorRevisionId] FrameworkComplianceSummary majorRevisionId - * @property {number|Long|null} [minorRevisionId] FrameworkComplianceSummary minorRevisionId - * @property {Array.|null} [targetResourceDetails] FrameworkComplianceSummary targetResourceDetails - * @property {number|Long|null} [findingCount] FrameworkComplianceSummary findingCount - * @property {google.cloud.cloudsecuritycompliance.v1.ITrend|null} [controlsPassingTrend] FrameworkComplianceSummary controlsPassingTrend - */ - - /** - * Constructs a new FrameworkComplianceSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FrameworkComplianceSummary. - * @implements IFrameworkComplianceSummary - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary=} [properties] Properties to set - */ - function FrameworkComplianceSummary(properties) { - this.supportedCloudProviders = []; - this.frameworkCategories = []; - this.targetResourceDetails = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FrameworkComplianceSummary framework. - * @member {string} framework - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.framework = ""; - - /** - * FrameworkComplianceSummary controlAssessmentDetails. - * @member {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null|undefined} controlAssessmentDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.controlAssessmentDetails = null; - - /** - * FrameworkComplianceSummary frameworkType. - * @member {google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType} frameworkType - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.frameworkType = 0; - - /** - * FrameworkComplianceSummary supportedCloudProviders. - * @member {Array.} supportedCloudProviders - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.supportedCloudProviders = $util.emptyArray; - - /** - * FrameworkComplianceSummary frameworkCategories. - * @member {Array.} frameworkCategories - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.frameworkCategories = $util.emptyArray; - - /** - * FrameworkComplianceSummary frameworkDisplayName. - * @member {string} frameworkDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.frameworkDisplayName = ""; - - /** - * FrameworkComplianceSummary name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.name = ""; - - /** - * FrameworkComplianceSummary majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * FrameworkComplianceSummary minorRevisionId. - * @member {number|Long} minorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * FrameworkComplianceSummary targetResourceDetails. - * @member {Array.} targetResourceDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.targetResourceDetails = $util.emptyArray; - - /** - * FrameworkComplianceSummary findingCount. - * @member {number|Long} findingCount - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.findingCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * FrameworkComplianceSummary controlsPassingTrend. - * @member {google.cloud.cloudsecuritycompliance.v1.ITrend|null|undefined} controlsPassingTrend - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - */ - FrameworkComplianceSummary.prototype.controlsPassingTrend = null; - - /** - * Creates a new FrameworkComplianceSummary instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary instance - */ - FrameworkComplianceSummary.create = function create(properties) { - return new FrameworkComplianceSummary(properties); - }; - - /** - * Encodes the specified FrameworkComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary} message FrameworkComplianceSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkComplianceSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); - if (message.controlAssessmentDetails != null && Object.hasOwnProperty.call(message, "controlAssessmentDetails")) - $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.encode(message.controlAssessmentDetails, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.frameworkType != null && Object.hasOwnProperty.call(message, "frameworkType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.frameworkType); - if (message.supportedCloudProviders != null && message.supportedCloudProviders.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - writer.int32(message.supportedCloudProviders[i]); - writer.ldelim(); - } - if (message.frameworkCategories != null && message.frameworkCategories.length) { - writer.uint32(/* id 5, wireType 2 =*/42).fork(); - for (var i = 0; i < message.frameworkCategories.length; ++i) - writer.int32(message.frameworkCategories[i]); - writer.ldelim(); - } - if (message.frameworkDisplayName != null && Object.hasOwnProperty.call(message, "frameworkDisplayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.frameworkDisplayName); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.majorRevisionId); - if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.minorRevisionId); - if (message.targetResourceDetails != null && message.targetResourceDetails.length) - for (var i = 0; i < message.targetResourceDetails.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.encode(message.targetResourceDetails[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.findingCount != null && Object.hasOwnProperty.call(message, "findingCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.findingCount); - if (message.controlsPassingTrend != null && Object.hasOwnProperty.call(message, "controlsPassingTrend")) - $root.google.cloud.cloudsecuritycompliance.v1.Trend.encode(message.controlsPassingTrend, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FrameworkComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary} message FrameworkComplianceSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FrameworkComplianceSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FrameworkComplianceSummary message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkComplianceSummary.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.framework = reader.string(); - break; - } - case 2: { - message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.decode(reader, reader.uint32()); - break; - } - case 3: { - message.frameworkType = reader.int32(); - break; - } - case 4: { - if (!(message.supportedCloudProviders && message.supportedCloudProviders.length)) - message.supportedCloudProviders = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedCloudProviders.push(reader.int32()); - } else - message.supportedCloudProviders.push(reader.int32()); - break; - } - case 5: { - if (!(message.frameworkCategories && message.frameworkCategories.length)) - message.frameworkCategories = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.frameworkCategories.push(reader.int32()); - } else - message.frameworkCategories.push(reader.int32()); - break; - } - case 6: { - message.frameworkDisplayName = reader.string(); - break; - } - case 7: { - message.name = reader.string(); - break; - } - case 8: { - message.majorRevisionId = reader.int64(); - break; - } - case 9: { - message.minorRevisionId = reader.int64(); - break; - } - case 10: { - if (!(message.targetResourceDetails && message.targetResourceDetails.length)) - message.targetResourceDetails = []; - message.targetResourceDetails.push($root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.decode(reader, reader.uint32())); - break; - } - case 11: { - message.findingCount = reader.int64(); - break; - } - case 12: { - message.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FrameworkComplianceSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FrameworkComplianceSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FrameworkComplianceSummary message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FrameworkComplianceSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.framework != null && message.hasOwnProperty("framework")) - if (!$util.isString(message.framework)) - return "framework: string expected"; - if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify(message.controlAssessmentDetails); - if (error) - return "controlAssessmentDetails." + error; - } - if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) - switch (message.frameworkType) { - default: - return "frameworkType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.supportedCloudProviders != null && message.hasOwnProperty("supportedCloudProviders")) { - if (!Array.isArray(message.supportedCloudProviders)) - return "supportedCloudProviders: array expected"; - for (var i = 0; i < message.supportedCloudProviders.length; ++i) - switch (message.supportedCloudProviders[i]) { - default: - return "supportedCloudProviders: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.frameworkCategories != null && message.hasOwnProperty("frameworkCategories")) { - if (!Array.isArray(message.frameworkCategories)) - return "frameworkCategories: array expected"; - for (var i = 0; i < message.frameworkCategories.length; ++i) - switch (message.frameworkCategories[i]) { - default: - return "frameworkCategories: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) - if (!$util.isString(message.frameworkDisplayName)) - return "frameworkDisplayName: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) - return "minorRevisionId: integer|Long expected"; - if (message.targetResourceDetails != null && message.hasOwnProperty("targetResourceDetails")) { - if (!Array.isArray(message.targetResourceDetails)) - return "targetResourceDetails: array expected"; - for (var i = 0; i < message.targetResourceDetails.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify(message.targetResourceDetails[i]); - if (error) - return "targetResourceDetails." + error; - } - } - if (message.findingCount != null && message.hasOwnProperty("findingCount")) - if (!$util.isInteger(message.findingCount) && !(message.findingCount && $util.isInteger(message.findingCount.low) && $util.isInteger(message.findingCount.high))) - return "findingCount: integer|Long expected"; - if (message.controlsPassingTrend != null && message.hasOwnProperty("controlsPassingTrend")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.Trend.verify(message.controlsPassingTrend); - if (error) - return "controlsPassingTrend." + error; - } - return null; - }; - - /** - * Creates a FrameworkComplianceSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} FrameworkComplianceSummary - */ - FrameworkComplianceSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary(); - if (object.framework != null) - message.framework = String(object.framework); - if (object.controlAssessmentDetails != null) { - if (typeof object.controlAssessmentDetails !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.controlAssessmentDetails: object expected"); - message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.fromObject(object.controlAssessmentDetails); - } - switch (object.frameworkType) { - default: - if (typeof object.frameworkType === "number") { - message.frameworkType = object.frameworkType; - break; - } - break; - case "FRAMEWORK_TYPE_UNSPECIFIED": - case 0: - message.frameworkType = 0; - break; - case "BUILT_IN": - case 1: - message.frameworkType = 1; - break; - case "CUSTOM": - case 2: - message.frameworkType = 2; - break; - } - if (object.supportedCloudProviders) { - if (!Array.isArray(object.supportedCloudProviders)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.supportedCloudProviders: array expected"); - message.supportedCloudProviders = []; - for (var i = 0; i < object.supportedCloudProviders.length; ++i) - switch (object.supportedCloudProviders[i]) { - default: - if (typeof object.supportedCloudProviders[i] === "number") { - message.supportedCloudProviders[i] = object.supportedCloudProviders[i]; - break; - } - case "CLOUD_PROVIDER_UNSPECIFIED": - case 0: - message.supportedCloudProviders[i] = 0; - break; - case "AWS": - case 1: - message.supportedCloudProviders[i] = 1; - break; - case "AZURE": - case 2: - message.supportedCloudProviders[i] = 2; - break; - case "GCP": - case 3: - message.supportedCloudProviders[i] = 3; - break; - } - } - if (object.frameworkCategories) { - if (!Array.isArray(object.frameworkCategories)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.frameworkCategories: array expected"); - message.frameworkCategories = []; - for (var i = 0; i < object.frameworkCategories.length; ++i) - switch (object.frameworkCategories[i]) { - default: - if (typeof object.frameworkCategories[i] === "number") { - message.frameworkCategories[i] = object.frameworkCategories[i]; - break; - } - case "FRAMEWORK_CATEGORY_UNSPECIFIED": - case 0: - message.frameworkCategories[i] = 0; - break; - case "INDUSTRY_DEFINED_STANDARD": - case 1: - message.frameworkCategories[i] = 1; - break; - case "ASSURED_WORKLOADS": - case 2: - message.frameworkCategories[i] = 2; - break; - case "DATA_SECURITY": - case 3: - message.frameworkCategories[i] = 3; - break; - case "GOOGLE_BEST_PRACTICES": - case 4: - message.frameworkCategories[i] = 4; - break; - case "CUSTOM_FRAMEWORK": - case 5: - message.frameworkCategories[i] = 5; - break; - } - } - if (object.frameworkDisplayName != null) - message.frameworkDisplayName = String(object.frameworkDisplayName); - if (object.name != null) - message.name = String(object.name); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - if (object.minorRevisionId != null) - if ($util.Long) - (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; - else if (typeof object.minorRevisionId === "string") - message.minorRevisionId = parseInt(object.minorRevisionId, 10); - else if (typeof object.minorRevisionId === "number") - message.minorRevisionId = object.minorRevisionId; - else if (typeof object.minorRevisionId === "object") - message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); - if (object.targetResourceDetails) { - if (!Array.isArray(object.targetResourceDetails)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.targetResourceDetails: array expected"); - message.targetResourceDetails = []; - for (var i = 0; i < object.targetResourceDetails.length; ++i) { - if (typeof object.targetResourceDetails[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.targetResourceDetails: object expected"); - message.targetResourceDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.fromObject(object.targetResourceDetails[i]); - } - } - if (object.findingCount != null) - if ($util.Long) - (message.findingCount = $util.Long.fromValue(object.findingCount)).unsigned = false; - else if (typeof object.findingCount === "string") - message.findingCount = parseInt(object.findingCount, 10); - else if (typeof object.findingCount === "number") - message.findingCount = object.findingCount; - else if (typeof object.findingCount === "object") - message.findingCount = new $util.LongBits(object.findingCount.low >>> 0, object.findingCount.high >>> 0).toNumber(); - if (object.controlsPassingTrend != null) { - if (typeof object.controlsPassingTrend !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.controlsPassingTrend: object expected"); - message.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.fromObject(object.controlsPassingTrend); - } - return message; - }; - - /** - * Creates a plain object from a FrameworkComplianceSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary} message FrameworkComplianceSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FrameworkComplianceSummary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.supportedCloudProviders = []; - object.frameworkCategories = []; - object.targetResourceDetails = []; - } - if (options.defaults) { - object.framework = ""; - object.controlAssessmentDetails = null; - object.frameworkType = options.enums === String ? "FRAMEWORK_TYPE_UNSPECIFIED" : 0; - object.frameworkDisplayName = ""; - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.minorRevisionId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.findingCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.findingCount = options.longs === String ? "0" : 0; - object.controlsPassingTrend = null; - } - if (message.framework != null && message.hasOwnProperty("framework")) - object.framework = message.framework; - if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) - object.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.toObject(message.controlAssessmentDetails, options); - if (message.frameworkType != null && message.hasOwnProperty("frameworkType")) - object.frameworkType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] === undefined ? message.frameworkType : $root.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType[message.frameworkType] : message.frameworkType; - if (message.supportedCloudProviders && message.supportedCloudProviders.length) { - object.supportedCloudProviders = []; - for (var j = 0; j < message.supportedCloudProviders.length; ++j) - object.supportedCloudProviders[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] === undefined ? message.supportedCloudProviders[j] : $root.google.cloud.cloudsecuritycompliance.v1.CloudProvider[message.supportedCloudProviders[j]] : message.supportedCloudProviders[j]; - } - if (message.frameworkCategories && message.frameworkCategories.length) { - object.frameworkCategories = []; - for (var j = 0; j < message.frameworkCategories.length; ++j) - object.frameworkCategories[j] = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] === undefined ? message.frameworkCategories[j] : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory[message.frameworkCategories[j]] : message.frameworkCategories[j]; - } - if (message.frameworkDisplayName != null && message.hasOwnProperty("frameworkDisplayName")) - object.frameworkDisplayName = message.frameworkDisplayName; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (typeof message.minorRevisionId === "number") - object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; - else - object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; - if (message.targetResourceDetails && message.targetResourceDetails.length) { - object.targetResourceDetails = []; - for (var j = 0; j < message.targetResourceDetails.length; ++j) - object.targetResourceDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.toObject(message.targetResourceDetails[j], options); - } - if (message.findingCount != null && message.hasOwnProperty("findingCount")) - if (typeof message.findingCount === "number") - object.findingCount = options.longs === String ? String(message.findingCount) : message.findingCount; - else - object.findingCount = options.longs === String ? $util.Long.prototype.toString.call(message.findingCount) : options.longs === Number ? new $util.LongBits(message.findingCount.low >>> 0, message.findingCount.high >>> 0).toNumber() : message.findingCount; - if (message.controlsPassingTrend != null && message.hasOwnProperty("controlsPassingTrend")) - object.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.toObject(message.controlsPassingTrend, options); - return object; - }; - - /** - * Converts this FrameworkComplianceSummary to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @instance - * @returns {Object.} JSON object - */ - FrameworkComplianceSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FrameworkComplianceSummary - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FrameworkComplianceSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary"; - }; - - return FrameworkComplianceSummary; - })(); - - v1.FindingSummary = (function() { - - /** - * Properties of a FindingSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IFindingSummary - * @property {string|null} [findingCategory] FindingSummary findingCategory - * @property {google.cloud.cloudsecuritycompliance.v1.FindingClass|null} [findingClass] FindingSummary findingClass - * @property {google.cloud.cloudsecuritycompliance.v1.Severity|null} [severity] FindingSummary severity - * @property {number|Long|null} [findingCount] FindingSummary findingCount - * @property {google.protobuf.ITimestamp|null} [updateTime] FindingSummary updateTime - * @property {Array.|null} [relatedFrameworks] FindingSummary relatedFrameworks - * @property {string|null} [name] FindingSummary name - */ - - /** - * Constructs a new FindingSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a FindingSummary. - * @implements IFindingSummary - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary=} [properties] Properties to set - */ - function FindingSummary(properties) { - this.relatedFrameworks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FindingSummary findingCategory. - * @member {string} findingCategory - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - */ - FindingSummary.prototype.findingCategory = ""; - - /** - * FindingSummary findingClass. - * @member {google.cloud.cloudsecuritycompliance.v1.FindingClass} findingClass - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - */ - FindingSummary.prototype.findingClass = 0; - - /** - * FindingSummary severity. - * @member {google.cloud.cloudsecuritycompliance.v1.Severity} severity - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - */ - FindingSummary.prototype.severity = 0; - - /** - * FindingSummary findingCount. - * @member {number|Long} findingCount - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - */ - FindingSummary.prototype.findingCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * FindingSummary updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - */ - FindingSummary.prototype.updateTime = null; - - /** - * FindingSummary relatedFrameworks. - * @member {Array.} relatedFrameworks - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - */ - FindingSummary.prototype.relatedFrameworks = $util.emptyArray; - - /** - * FindingSummary name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - */ - FindingSummary.prototype.name = ""; - - /** - * Creates a new FindingSummary instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary instance - */ - FindingSummary.create = function create(properties) { - return new FindingSummary(properties); - }; - - /** - * Encodes the specified FindingSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary} message FindingSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindingSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.findingCategory != null && Object.hasOwnProperty.call(message, "findingCategory")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.findingCategory); - if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.findingClass); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.severity); - if (message.findingCount != null && Object.hasOwnProperty.call(message, "findingCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.findingCount); - 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.relatedFrameworks != null && message.relatedFrameworks.length) - for (var i = 0; i < message.relatedFrameworks.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedFrameworks[i]); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); - return writer; - }; - - /** - * Encodes the specified FindingSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.FindingSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IFindingSummary} message FindingSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindingSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindingSummary message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindingSummary.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.findingCategory = reader.string(); - break; - } - case 2: { - message.findingClass = reader.int32(); - break; - } - case 3: { - message.severity = reader.int32(); - break; - } - case 4: { - message.findingCount = reader.int64(); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.relatedFrameworks && message.relatedFrameworks.length)) - message.relatedFrameworks = []; - message.relatedFrameworks.push(reader.string()); - break; - } - case 7: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FindingSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindingSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FindingSummary message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FindingSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) - if (!$util.isString(message.findingCategory)) - return "findingCategory: string expected"; - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - switch (message.findingClass) { - default: - return "findingClass: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.findingCount != null && message.hasOwnProperty("findingCount")) - if (!$util.isInteger(message.findingCount) && !(message.findingCount && $util.isInteger(message.findingCount.low) && $util.isInteger(message.findingCount.high))) - return "findingCount: integer|Long expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.relatedFrameworks != null && message.hasOwnProperty("relatedFrameworks")) { - if (!Array.isArray(message.relatedFrameworks)) - return "relatedFrameworks: array expected"; - for (var i = 0; i < message.relatedFrameworks.length; ++i) - if (!$util.isString(message.relatedFrameworks[i])) - return "relatedFrameworks: string[] expected"; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a FindingSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.FindingSummary} FindingSummary - */ - FindingSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.FindingSummary(); - if (object.findingCategory != null) - message.findingCategory = String(object.findingCategory); - switch (object.findingClass) { - default: - if (typeof object.findingClass === "number") { - message.findingClass = object.findingClass; - break; - } - break; - case "FINDING_CLASS_UNSPECIFIED": - case 0: - message.findingClass = 0; - break; - case "THREAT": - case 1: - message.findingClass = 1; - break; - case "VULNERABILITY": - case 2: - message.findingClass = 2; - break; - case "MISCONFIGURATION": - case 3: - message.findingClass = 3; - break; - case "OBSERVATION": - case 4: - message.findingClass = 4; - break; - case "SCC_ERROR": - case 5: - message.findingClass = 5; - break; - case "POSTURE_VIOLATION": - case 6: - message.findingClass = 6; - break; - case "TOXIC_COMBINATION": - case 7: - message.findingClass = 7; - break; - case "SENSITIVE_DATA_RISK": - case 8: - message.findingClass = 8; - break; - case "CHOKEPOINT": - case 9: - message.findingClass = 9; - break; - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "CRITICAL": - case 1: - message.severity = 1; - break; - case "HIGH": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "LOW": - case 4: - message.severity = 4; - break; - } - if (object.findingCount != null) - if ($util.Long) - (message.findingCount = $util.Long.fromValue(object.findingCount)).unsigned = false; - else if (typeof object.findingCount === "string") - message.findingCount = parseInt(object.findingCount, 10); - else if (typeof object.findingCount === "number") - message.findingCount = object.findingCount; - else if (typeof object.findingCount === "object") - message.findingCount = new $util.LongBits(object.findingCount.low >>> 0, object.findingCount.high >>> 0).toNumber(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingSummary.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.relatedFrameworks) { - if (!Array.isArray(object.relatedFrameworks)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FindingSummary.relatedFrameworks: array expected"); - message.relatedFrameworks = []; - for (var i = 0; i < object.relatedFrameworks.length; ++i) - message.relatedFrameworks[i] = String(object.relatedFrameworks[i]); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a FindingSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.FindingSummary} message FindingSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FindingSummary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relatedFrameworks = []; - if (options.defaults) { - object.findingCategory = ""; - object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.findingCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.findingCount = options.longs === String ? "0" : 0; - object.updateTime = null; - object.name = ""; - } - if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) - object.findingCategory = message.findingCategory; - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - object.findingClass = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.cloudsecuritycompliance.v1.FindingClass[message.findingClass] : message.findingClass; - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.severity] : message.severity; - if (message.findingCount != null && message.hasOwnProperty("findingCount")) - if (typeof message.findingCount === "number") - object.findingCount = options.longs === String ? String(message.findingCount) : message.findingCount; - else - object.findingCount = options.longs === String ? $util.Long.prototype.toString.call(message.findingCount) : options.longs === Number ? new $util.LongBits(message.findingCount.low >>> 0, message.findingCount.high >>> 0).toNumber() : message.findingCount; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.relatedFrameworks && message.relatedFrameworks.length) { - object.relatedFrameworks = []; - for (var j = 0; j < message.relatedFrameworks.length; ++j) - object.relatedFrameworks[j] = message.relatedFrameworks[j]; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this FindingSummary to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @instance - * @returns {Object.} JSON object - */ - FindingSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FindingSummary - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.FindingSummary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FindingSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.FindingSummary"; - }; - - return FindingSummary; - })(); - - v1.ControlComplianceSummary = (function() { - - /** - * Properties of a ControlComplianceSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IControlComplianceSummary - * @property {string|null} [control] ControlComplianceSummary control - * @property {string|null} [displayName] ControlComplianceSummary displayName - * @property {string|null} [description] ControlComplianceSummary description - * @property {google.cloud.cloudsecuritycompliance.v1.EvaluationState|null} [overallEvaluationState] ControlComplianceSummary overallEvaluationState - * @property {number|null} [totalFindingsCount] ControlComplianceSummary totalFindingsCount - * @property {Array.|null} [complianceFrameworks] ControlComplianceSummary complianceFrameworks - * @property {Array.|null} [similarControls] ControlComplianceSummary similarControls - * @property {Array.|null} [cloudControlReports] ControlComplianceSummary cloudControlReports - * @property {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null} [controlResponsibilityType] ControlComplianceSummary controlResponsibilityType - * @property {boolean|null} [isFakeControl] ControlComplianceSummary isFakeControl - * @property {string|null} [name] ControlComplianceSummary name - */ - - /** - * Constructs a new ControlComplianceSummary. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ControlComplianceSummary. - * @implements IControlComplianceSummary - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary=} [properties] Properties to set - */ - function ControlComplianceSummary(properties) { - this.complianceFrameworks = []; - this.similarControls = []; - this.cloudControlReports = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ControlComplianceSummary control. - * @member {string} control - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.control = ""; - - /** - * ControlComplianceSummary displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.displayName = ""; - - /** - * ControlComplianceSummary description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.description = ""; - - /** - * ControlComplianceSummary overallEvaluationState. - * @member {google.cloud.cloudsecuritycompliance.v1.EvaluationState} overallEvaluationState - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.overallEvaluationState = 0; - - /** - * ControlComplianceSummary totalFindingsCount. - * @member {number} totalFindingsCount - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.totalFindingsCount = 0; - - /** - * ControlComplianceSummary complianceFrameworks. - * @member {Array.} complianceFrameworks - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.complianceFrameworks = $util.emptyArray; - - /** - * ControlComplianceSummary similarControls. - * @member {Array.} similarControls - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.similarControls = $util.emptyArray; - - /** - * ControlComplianceSummary cloudControlReports. - * @member {Array.} cloudControlReports - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.cloudControlReports = $util.emptyArray; - - /** - * ControlComplianceSummary controlResponsibilityType. - * @member {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType} controlResponsibilityType - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.controlResponsibilityType = 0; - - /** - * ControlComplianceSummary isFakeControl. - * @member {boolean} isFakeControl - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.isFakeControl = false; - - /** - * ControlComplianceSummary name. - * @member {string} name - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - */ - ControlComplianceSummary.prototype.name = ""; - - /** - * Creates a new ControlComplianceSummary instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary instance - */ - ControlComplianceSummary.create = function create(properties) { - return new ControlComplianceSummary(properties); - }; - - /** - * Encodes the specified ControlComplianceSummary message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary} message ControlComplianceSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlComplianceSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.control != null && Object.hasOwnProperty.call(message, "control")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.control); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.overallEvaluationState != null && Object.hasOwnProperty.call(message, "overallEvaluationState")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.overallEvaluationState); - if (message.totalFindingsCount != null && Object.hasOwnProperty.call(message, "totalFindingsCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalFindingsCount); - if (message.complianceFrameworks != null && message.complianceFrameworks.length) - for (var i = 0; i < message.complianceFrameworks.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.complianceFrameworks[i]); - if (message.similarControls != null && message.similarControls.length) - for (var i = 0; i < message.similarControls.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.encode(message.similarControls[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cloudControlReports != null && message.cloudControlReports.length) - for (var i = 0; i < message.cloudControlReports.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.encode(message.cloudControlReports[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.controlResponsibilityType != null && Object.hasOwnProperty.call(message, "controlResponsibilityType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.controlResponsibilityType); - if (message.isFakeControl != null && Object.hasOwnProperty.call(message, "isFakeControl")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isFakeControl); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.name); - return writer; - }; - - /** - * Encodes the specified ControlComplianceSummary message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary} message ControlComplianceSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControlComplianceSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ControlComplianceSummary message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlComplianceSummary.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.control = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.overallEvaluationState = reader.int32(); - break; - } - case 5: { - message.totalFindingsCount = reader.int32(); - break; - } - case 6: { - if (!(message.complianceFrameworks && message.complianceFrameworks.length)) - message.complianceFrameworks = []; - message.complianceFrameworks.push(reader.string()); - break; - } - case 7: { - if (!(message.similarControls && message.similarControls.length)) - message.similarControls = []; - message.similarControls.push($root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.cloudControlReports && message.cloudControlReports.length)) - message.cloudControlReports = []; - message.cloudControlReports.push($root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.decode(reader, reader.uint32())); - break; - } - case 9: { - message.controlResponsibilityType = reader.int32(); - break; - } - case 10: { - message.isFakeControl = reader.bool(); - break; - } - case 11: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ControlComplianceSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControlComplianceSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ControlComplianceSummary message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ControlComplianceSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.control != null && message.hasOwnProperty("control")) - if (!$util.isString(message.control)) - return "control: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.overallEvaluationState != null && message.hasOwnProperty("overallEvaluationState")) - switch (message.overallEvaluationState) { - default: - return "overallEvaluationState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.totalFindingsCount != null && message.hasOwnProperty("totalFindingsCount")) - if (!$util.isInteger(message.totalFindingsCount)) - return "totalFindingsCount: integer expected"; - if (message.complianceFrameworks != null && message.hasOwnProperty("complianceFrameworks")) { - if (!Array.isArray(message.complianceFrameworks)) - return "complianceFrameworks: array expected"; - for (var i = 0; i < message.complianceFrameworks.length; ++i) - if (!$util.isString(message.complianceFrameworks[i])) - return "complianceFrameworks: string[] expected"; - } - if (message.similarControls != null && message.hasOwnProperty("similarControls")) { - if (!Array.isArray(message.similarControls)) - return "similarControls: array expected"; - for (var i = 0; i < message.similarControls.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify(message.similarControls[i]); - if (error) - return "similarControls." + error; - } - } - if (message.cloudControlReports != null && message.hasOwnProperty("cloudControlReports")) { - if (!Array.isArray(message.cloudControlReports)) - return "cloudControlReports: array expected"; - for (var i = 0; i < message.cloudControlReports.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify(message.cloudControlReports[i]); - if (error) - return "cloudControlReports." + error; - } - } - if (message.controlResponsibilityType != null && message.hasOwnProperty("controlResponsibilityType")) - switch (message.controlResponsibilityType) { - default: - return "controlResponsibilityType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.isFakeControl != null && message.hasOwnProperty("isFakeControl")) - if (typeof message.isFakeControl !== "boolean") - return "isFakeControl: boolean expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a ControlComplianceSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} ControlComplianceSummary - */ - ControlComplianceSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary(); - if (object.control != null) - message.control = String(object.control); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - switch (object.overallEvaluationState) { - default: - if (typeof object.overallEvaluationState === "number") { - message.overallEvaluationState = object.overallEvaluationState; - break; - } - break; - case "EVALUATION_STATE_UNSPECIFIED": - case 0: - message.overallEvaluationState = 0; - break; - case "EVALUATION_STATE_PASSED": - case 1: - message.overallEvaluationState = 1; - break; - case "EVALUATION_STATE_FAILED": - case 2: - message.overallEvaluationState = 2; - break; - case "EVALUATION_STATE_NOT_ASSESSED": - case 3: - message.overallEvaluationState = 3; - break; - } - if (object.totalFindingsCount != null) - message.totalFindingsCount = object.totalFindingsCount | 0; - if (object.complianceFrameworks) { - if (!Array.isArray(object.complianceFrameworks)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.complianceFrameworks: array expected"); - message.complianceFrameworks = []; - for (var i = 0; i < object.complianceFrameworks.length; ++i) - message.complianceFrameworks[i] = String(object.complianceFrameworks[i]); - } - if (object.similarControls) { - if (!Array.isArray(object.similarControls)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.similarControls: array expected"); - message.similarControls = []; - for (var i = 0; i < object.similarControls.length; ++i) { - if (typeof object.similarControls[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.similarControls: object expected"); - message.similarControls[i] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.fromObject(object.similarControls[i]); - } - } - if (object.cloudControlReports) { - if (!Array.isArray(object.cloudControlReports)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.cloudControlReports: array expected"); - message.cloudControlReports = []; - for (var i = 0; i < object.cloudControlReports.length; ++i) { - if (typeof object.cloudControlReports[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary.cloudControlReports: object expected"); - message.cloudControlReports[i] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.fromObject(object.cloudControlReports[i]); - } - } - switch (object.controlResponsibilityType) { - default: - if (typeof object.controlResponsibilityType === "number") { - message.controlResponsibilityType = object.controlResponsibilityType; - break; - } - break; - case "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED": - case 0: - message.controlResponsibilityType = 0; - break; - case "GOOGLE": - case 1: - message.controlResponsibilityType = 1; - break; - case "CUSTOMER": - case 2: - message.controlResponsibilityType = 2; - break; - case "SHARED": - case 3: - message.controlResponsibilityType = 3; - break; - } - if (object.isFakeControl != null) - message.isFakeControl = Boolean(object.isFakeControl); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a ControlComplianceSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary} message ControlComplianceSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ControlComplianceSummary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.complianceFrameworks = []; - object.similarControls = []; - object.cloudControlReports = []; - } - if (options.defaults) { - object.control = ""; - object.displayName = ""; - object.description = ""; - object.overallEvaluationState = options.enums === String ? "EVALUATION_STATE_UNSPECIFIED" : 0; - object.totalFindingsCount = 0; - object.controlResponsibilityType = options.enums === String ? "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" : 0; - object.isFakeControl = false; - object.name = ""; - } - if (message.control != null && message.hasOwnProperty("control")) - object.control = message.control; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.overallEvaluationState != null && message.hasOwnProperty("overallEvaluationState")) - object.overallEvaluationState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.overallEvaluationState] === undefined ? message.overallEvaluationState : $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.overallEvaluationState] : message.overallEvaluationState; - if (message.totalFindingsCount != null && message.hasOwnProperty("totalFindingsCount")) - object.totalFindingsCount = message.totalFindingsCount; - if (message.complianceFrameworks && message.complianceFrameworks.length) { - object.complianceFrameworks = []; - for (var j = 0; j < message.complianceFrameworks.length; ++j) - object.complianceFrameworks[j] = message.complianceFrameworks[j]; - } - if (message.similarControls && message.similarControls.length) { - object.similarControls = []; - for (var j = 0; j < message.similarControls.length; ++j) - object.similarControls[j] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.toObject(message.similarControls[j], options); - } - if (message.cloudControlReports && message.cloudControlReports.length) { - object.cloudControlReports = []; - for (var j = 0; j < message.cloudControlReports.length; ++j) - object.cloudControlReports[j] = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport.toObject(message.cloudControlReports[j], options); - } - if (message.controlResponsibilityType != null && message.hasOwnProperty("controlResponsibilityType")) - object.controlResponsibilityType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.controlResponsibilityType] === undefined ? message.controlResponsibilityType : $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.controlResponsibilityType] : message.controlResponsibilityType; - if (message.isFakeControl != null && message.hasOwnProperty("isFakeControl")) - object.isFakeControl = message.isFakeControl; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ControlComplianceSummary to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @instance - * @returns {Object.} JSON object - */ - ControlComplianceSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ControlComplianceSummary - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ControlComplianceSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary"; - }; - - return ControlComplianceSummary; - })(); - - v1.CloudControlReport = (function() { - - /** - * Properties of a CloudControlReport. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlReport - * @property {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null} [manualCloudControlAssessmentDetails] CloudControlReport manualCloudControlAssessmentDetails - * @property {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null} [cloudControlAssessmentDetails] CloudControlReport cloudControlAssessmentDetails - * @property {string|null} [cloudControl] CloudControlReport cloudControl - * @property {string|null} [displayName] CloudControlReport displayName - * @property {string|null} [description] CloudControlReport description - * @property {Array.|null} [categories] CloudControlReport categories - * @property {Array.|null} [similarControls] CloudControlReport similarControls - * @property {google.cloud.cloudsecuritycompliance.v1.CloudControl.Type|null} [cloudControlType] CloudControlReport cloudControlType - * @property {string|null} [findingCategory] CloudControlReport findingCategory - * @property {Array.|null} [rules] CloudControlReport rules - * @property {google.cloud.cloudsecuritycompliance.v1.Severity|null} [findingSeverity] CloudControlReport findingSeverity - * @property {google.cloud.cloudsecuritycompliance.v1.EnforcementMode|null} [enforcementMode] CloudControlReport enforcementMode - * @property {string|null} [cloudControlDeployment] CloudControlReport cloudControlDeployment - * @property {number|Long|null} [majorRevisionId] CloudControlReport majorRevisionId - * @property {number|Long|null} [minorRevisionId] CloudControlReport minorRevisionId - * @property {Array.|null} [frameworkMajorRevisionIds] CloudControlReport frameworkMajorRevisionIds - */ - - /** - * Constructs a new CloudControlReport. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlReport. - * @implements ICloudControlReport - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport=} [properties] Properties to set - */ - function CloudControlReport(properties) { - this.categories = []; - this.similarControls = []; - this.rules = []; - this.frameworkMajorRevisionIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlReport manualCloudControlAssessmentDetails. - * @member {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails|null|undefined} manualCloudControlAssessmentDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.manualCloudControlAssessmentDetails = null; - - /** - * CloudControlReport cloudControlAssessmentDetails. - * @member {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails|null|undefined} cloudControlAssessmentDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.cloudControlAssessmentDetails = null; - - /** - * CloudControlReport cloudControl. - * @member {string} cloudControl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.cloudControl = ""; - - /** - * CloudControlReport displayName. - * @member {string} displayName - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.displayName = ""; - - /** - * CloudControlReport description. - * @member {string} description - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.description = ""; - - /** - * CloudControlReport categories. - * @member {Array.} categories - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.categories = $util.emptyArray; - - /** - * CloudControlReport similarControls. - * @member {Array.} similarControls - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.similarControls = $util.emptyArray; - - /** - * CloudControlReport cloudControlType. - * @member {google.cloud.cloudsecuritycompliance.v1.CloudControl.Type} cloudControlType - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.cloudControlType = 0; - - /** - * CloudControlReport findingCategory. - * @member {string} findingCategory - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.findingCategory = ""; - - /** - * CloudControlReport rules. - * @member {Array.} rules - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.rules = $util.emptyArray; - - /** - * CloudControlReport findingSeverity. - * @member {google.cloud.cloudsecuritycompliance.v1.Severity} findingSeverity - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.findingSeverity = 0; - - /** - * CloudControlReport enforcementMode. - * @member {google.cloud.cloudsecuritycompliance.v1.EnforcementMode} enforcementMode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.enforcementMode = 0; - - /** - * CloudControlReport cloudControlDeployment. - * @member {string} cloudControlDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.cloudControlDeployment = ""; - - /** - * CloudControlReport majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CloudControlReport minorRevisionId. - * @member {number|Long} minorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CloudControlReport frameworkMajorRevisionIds. - * @member {Array.} frameworkMajorRevisionIds - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - CloudControlReport.prototype.frameworkMajorRevisionIds = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CloudControlReport assessmentDetails. - * @member {"manualCloudControlAssessmentDetails"|"cloudControlAssessmentDetails"|undefined} assessmentDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - */ - Object.defineProperty(CloudControlReport.prototype, "assessmentDetails", { - get: $util.oneOfGetter($oneOfFields = ["manualCloudControlAssessmentDetails", "cloudControlAssessmentDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CloudControlReport instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport instance - */ - CloudControlReport.create = function create(properties) { - return new CloudControlReport(properties); - }; - - /** - * Encodes the specified CloudControlReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport} message CloudControlReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cloudControl != null && Object.hasOwnProperty.call(message, "cloudControl")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudControl); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.categories != null && message.categories.length) - for (var i = 0; i < message.categories.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.categories[i]); - if (message.similarControls != null && message.similarControls.length) - for (var i = 0; i < message.similarControls.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.encode(message.similarControls[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.cloudControlType != null && Object.hasOwnProperty.call(message, "cloudControlType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.cloudControlType); - if (message.findingCategory != null && Object.hasOwnProperty.call(message, "findingCategory")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.findingCategory); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.cloud.cloudsecuritycompliance.v1.Rule.encode(message.rules[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.manualCloudControlAssessmentDetails != null && Object.hasOwnProperty.call(message, "manualCloudControlAssessmentDetails")) - $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.encode(message.manualCloudControlAssessmentDetails, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.cloudControlAssessmentDetails != null && Object.hasOwnProperty.call(message, "cloudControlAssessmentDetails")) - $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.encode(message.cloudControlAssessmentDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.findingSeverity != null && Object.hasOwnProperty.call(message, "findingSeverity")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.findingSeverity); - if (message.enforcementMode != null && Object.hasOwnProperty.call(message, "enforcementMode")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.enforcementMode); - if (message.cloudControlDeployment != null && Object.hasOwnProperty.call(message, "cloudControlDeployment")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.cloudControlDeployment); - if (message.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 18, wireType 0 =*/144).int64(message.majorRevisionId); - if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) - writer.uint32(/* id 19, wireType 0 =*/152).int64(message.minorRevisionId); - if (message.frameworkMajorRevisionIds != null && message.frameworkMajorRevisionIds.length) { - writer.uint32(/* id 20, wireType 2 =*/162).fork(); - for (var i = 0; i < message.frameworkMajorRevisionIds.length; ++i) - writer.int64(message.frameworkMajorRevisionIds[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CloudControlReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlReport} message CloudControlReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlReport.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 13: { - message.manualCloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.decode(reader, reader.uint32()); - break; - } - case 14: { - message.cloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.decode(reader, reader.uint32()); - break; - } - case 1: { - message.cloudControl = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 6: { - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push(reader.string()); - break; - } - case 9: { - if (!(message.similarControls && message.similarControls.length)) - message.similarControls = []; - message.similarControls.push($root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.decode(reader, reader.uint32())); - break; - } - case 10: { - message.cloudControlType = reader.int32(); - break; - } - case 11: { - message.findingCategory = reader.string(); - break; - } - case 12: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.cloud.cloudsecuritycompliance.v1.Rule.decode(reader, reader.uint32())); - break; - } - case 15: { - message.findingSeverity = reader.int32(); - break; - } - case 16: { - message.enforcementMode = reader.int32(); - break; - } - case 17: { - message.cloudControlDeployment = reader.string(); - break; - } - case 18: { - message.majorRevisionId = reader.int64(); - break; - } - case 19: { - message.minorRevisionId = reader.int64(); - break; - } - case 20: { - if (!(message.frameworkMajorRevisionIds && message.frameworkMajorRevisionIds.length)) - message.frameworkMajorRevisionIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.frameworkMajorRevisionIds.push(reader.int64()); - } else - message.frameworkMajorRevisionIds.push(reader.int64()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlReport message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.manualCloudControlAssessmentDetails != null && message.hasOwnProperty("manualCloudControlAssessmentDetails")) { - properties.assessmentDetails = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify(message.manualCloudControlAssessmentDetails); - if (error) - return "manualCloudControlAssessmentDetails." + error; - } - } - if (message.cloudControlAssessmentDetails != null && message.hasOwnProperty("cloudControlAssessmentDetails")) { - if (properties.assessmentDetails === 1) - return "assessmentDetails: multiple values"; - properties.assessmentDetails = 1; - { - var error = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify(message.cloudControlAssessmentDetails); - if (error) - return "cloudControlAssessmentDetails." + error; - } - } - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) - if (!$util.isString(message.cloudControl)) - return "cloudControl: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) - return "categories: array expected"; - for (var i = 0; i < message.categories.length; ++i) - if (!$util.isString(message.categories[i])) - return "categories: string[] expected"; - } - if (message.similarControls != null && message.hasOwnProperty("similarControls")) { - if (!Array.isArray(message.similarControls)) - return "similarControls: array expected"; - for (var i = 0; i < message.similarControls.length; ++i) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify(message.similarControls[i]); - if (error) - return "similarControls." + error; - } - } - if (message.cloudControlType != null && message.hasOwnProperty("cloudControlType")) - switch (message.cloudControlType) { - default: - return "cloudControlType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) - if (!$util.isString(message.findingCategory)) - return "findingCategory: 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.cloud.cloudsecuritycompliance.v1.Rule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.findingSeverity != null && message.hasOwnProperty("findingSeverity")) - switch (message.findingSeverity) { - default: - return "findingSeverity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) - switch (message.enforcementMode) { - default: - return "enforcementMode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) - if (!$util.isString(message.cloudControlDeployment)) - return "cloudControlDeployment: string expected"; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) - return "minorRevisionId: integer|Long expected"; - if (message.frameworkMajorRevisionIds != null && message.hasOwnProperty("frameworkMajorRevisionIds")) { - if (!Array.isArray(message.frameworkMajorRevisionIds)) - return "frameworkMajorRevisionIds: array expected"; - for (var i = 0; i < message.frameworkMajorRevisionIds.length; ++i) - if (!$util.isInteger(message.frameworkMajorRevisionIds[i]) && !(message.frameworkMajorRevisionIds[i] && $util.isInteger(message.frameworkMajorRevisionIds[i].low) && $util.isInteger(message.frameworkMajorRevisionIds[i].high))) - return "frameworkMajorRevisionIds: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a CloudControlReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} CloudControlReport - */ - CloudControlReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlReport(); - if (object.manualCloudControlAssessmentDetails != null) { - if (typeof object.manualCloudControlAssessmentDetails !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.manualCloudControlAssessmentDetails: object expected"); - message.manualCloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.fromObject(object.manualCloudControlAssessmentDetails); - } - if (object.cloudControlAssessmentDetails != null) { - if (typeof object.cloudControlAssessmentDetails !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.cloudControlAssessmentDetails: object expected"); - message.cloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.fromObject(object.cloudControlAssessmentDetails); - } - if (object.cloudControl != null) - message.cloudControl = String(object.cloudControl); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.categories: array expected"); - message.categories = []; - for (var i = 0; i < object.categories.length; ++i) - message.categories[i] = String(object.categories[i]); - } - if (object.similarControls) { - if (!Array.isArray(object.similarControls)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.similarControls: array expected"); - message.similarControls = []; - for (var i = 0; i < object.similarControls.length; ++i) { - if (typeof object.similarControls[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.similarControls: object expected"); - message.similarControls[i] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.fromObject(object.similarControls[i]); - } - } - switch (object.cloudControlType) { - default: - if (typeof object.cloudControlType === "number") { - message.cloudControlType = object.cloudControlType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.cloudControlType = 0; - break; - case "CUSTOM": - case 1: - message.cloudControlType = 1; - break; - case "BUILT_IN": - case 2: - message.cloudControlType = 2; - break; - } - if (object.findingCategory != null) - message.findingCategory = String(object.findingCategory); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.rules: object expected"); - message.rules[i] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.fromObject(object.rules[i]); - } - } - switch (object.findingSeverity) { - default: - if (typeof object.findingSeverity === "number") { - message.findingSeverity = object.findingSeverity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.findingSeverity = 0; - break; - case "CRITICAL": - case 1: - message.findingSeverity = 1; - break; - case "HIGH": - case 2: - message.findingSeverity = 2; - break; - case "MEDIUM": - case 3: - message.findingSeverity = 3; - break; - case "LOW": - case 4: - message.findingSeverity = 4; - break; - } - switch (object.enforcementMode) { - default: - if (typeof object.enforcementMode === "number") { - message.enforcementMode = object.enforcementMode; - break; - } - break; - case "ENFORCEMENT_MODE_UNSPECIFIED": - case 0: - message.enforcementMode = 0; - break; - case "PREVENTIVE": - case 1: - message.enforcementMode = 1; - break; - case "DETECTIVE": - case 2: - message.enforcementMode = 2; - break; - case "AUDIT": - case 3: - message.enforcementMode = 3; - break; - } - if (object.cloudControlDeployment != null) - message.cloudControlDeployment = String(object.cloudControlDeployment); - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - if (object.minorRevisionId != null) - if ($util.Long) - (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; - else if (typeof object.minorRevisionId === "string") - message.minorRevisionId = parseInt(object.minorRevisionId, 10); - else if (typeof object.minorRevisionId === "number") - message.minorRevisionId = object.minorRevisionId; - else if (typeof object.minorRevisionId === "object") - message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); - if (object.frameworkMajorRevisionIds) { - if (!Array.isArray(object.frameworkMajorRevisionIds)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.CloudControlReport.frameworkMajorRevisionIds: array expected"); - message.frameworkMajorRevisionIds = []; - for (var i = 0; i < object.frameworkMajorRevisionIds.length; ++i) - if ($util.Long) - (message.frameworkMajorRevisionIds[i] = $util.Long.fromValue(object.frameworkMajorRevisionIds[i])).unsigned = false; - else if (typeof object.frameworkMajorRevisionIds[i] === "string") - message.frameworkMajorRevisionIds[i] = parseInt(object.frameworkMajorRevisionIds[i], 10); - else if (typeof object.frameworkMajorRevisionIds[i] === "number") - message.frameworkMajorRevisionIds[i] = object.frameworkMajorRevisionIds[i]; - else if (typeof object.frameworkMajorRevisionIds[i] === "object") - message.frameworkMajorRevisionIds[i] = new $util.LongBits(object.frameworkMajorRevisionIds[i].low >>> 0, object.frameworkMajorRevisionIds[i].high >>> 0).toNumber(); - } - return message; - }; - - /** - * Creates a plain object from a CloudControlReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlReport} message CloudControlReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.categories = []; - object.similarControls = []; - object.rules = []; - object.frameworkMajorRevisionIds = []; - } - if (options.defaults) { - object.cloudControl = ""; - object.displayName = ""; - object.description = ""; - object.cloudControlType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.findingCategory = ""; - object.findingSeverity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.enforcementMode = options.enums === String ? "ENFORCEMENT_MODE_UNSPECIFIED" : 0; - object.cloudControlDeployment = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.minorRevisionId = options.longs === String ? "0" : 0; - } - if (message.cloudControl != null && message.hasOwnProperty("cloudControl")) - object.cloudControl = message.cloudControl; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.categories && message.categories.length) { - object.categories = []; - for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = message.categories[j]; - } - if (message.similarControls && message.similarControls.length) { - object.similarControls = []; - for (var j = 0; j < message.similarControls.length; ++j) - object.similarControls[j] = $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls.toObject(message.similarControls[j], options); - } - if (message.cloudControlType != null && message.hasOwnProperty("cloudControlType")) - object.cloudControlType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type[message.cloudControlType] === undefined ? message.cloudControlType : $root.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type[message.cloudControlType] : message.cloudControlType; - if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) - object.findingCategory = message.findingCategory; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.cloud.cloudsecuritycompliance.v1.Rule.toObject(message.rules[j], options); - } - if (message.manualCloudControlAssessmentDetails != null && message.hasOwnProperty("manualCloudControlAssessmentDetails")) { - object.manualCloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.toObject(message.manualCloudControlAssessmentDetails, options); - if (options.oneofs) - object.assessmentDetails = "manualCloudControlAssessmentDetails"; - } - if (message.cloudControlAssessmentDetails != null && message.hasOwnProperty("cloudControlAssessmentDetails")) { - object.cloudControlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.toObject(message.cloudControlAssessmentDetails, options); - if (options.oneofs) - object.assessmentDetails = "cloudControlAssessmentDetails"; - } - if (message.findingSeverity != null && message.hasOwnProperty("findingSeverity")) - object.findingSeverity = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.findingSeverity] === undefined ? message.findingSeverity : $root.google.cloud.cloudsecuritycompliance.v1.Severity[message.findingSeverity] : message.findingSeverity; - if (message.enforcementMode != null && message.hasOwnProperty("enforcementMode")) - object.enforcementMode = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] === undefined ? message.enforcementMode : $root.google.cloud.cloudsecuritycompliance.v1.EnforcementMode[message.enforcementMode] : message.enforcementMode; - if (message.cloudControlDeployment != null && message.hasOwnProperty("cloudControlDeployment")) - object.cloudControlDeployment = message.cloudControlDeployment; - if (message.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (typeof message.minorRevisionId === "number") - object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; - else - object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; - if (message.frameworkMajorRevisionIds && message.frameworkMajorRevisionIds.length) { - object.frameworkMajorRevisionIds = []; - for (var j = 0; j < message.frameworkMajorRevisionIds.length; ++j) - if (typeof message.frameworkMajorRevisionIds[j] === "number") - object.frameworkMajorRevisionIds[j] = options.longs === String ? String(message.frameworkMajorRevisionIds[j]) : message.frameworkMajorRevisionIds[j]; - else - object.frameworkMajorRevisionIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.frameworkMajorRevisionIds[j]) : options.longs === Number ? new $util.LongBits(message.frameworkMajorRevisionIds[j].low >>> 0, message.frameworkMajorRevisionIds[j].high >>> 0).toNumber() : message.frameworkMajorRevisionIds[j]; - } - return object; - }; - - /** - * Converts this CloudControlReport to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @instance - * @returns {Object.} JSON object - */ - CloudControlReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlReport - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlReport"; - }; - - return CloudControlReport; - })(); - - v1.ManualCloudControlAssessmentDetails = (function() { - - /** - * Properties of a ManualCloudControlAssessmentDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IManualCloudControlAssessmentDetails - * @property {Array.|null} [manualCloudControlGuide] ManualCloudControlAssessmentDetails manualCloudControlGuide - */ - - /** - * Constructs a new ManualCloudControlAssessmentDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a ManualCloudControlAssessmentDetails. - * @implements IManualCloudControlAssessmentDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails=} [properties] Properties to set - */ - function ManualCloudControlAssessmentDetails(properties) { - this.manualCloudControlGuide = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManualCloudControlAssessmentDetails manualCloudControlGuide. - * @member {Array.} manualCloudControlGuide - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @instance - */ - ManualCloudControlAssessmentDetails.prototype.manualCloudControlGuide = $util.emptyArray; - - /** - * Creates a new ManualCloudControlAssessmentDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails instance - */ - ManualCloudControlAssessmentDetails.create = function create(properties) { - return new ManualCloudControlAssessmentDetails(properties); - }; - - /** - * Encodes the specified ManualCloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails} message ManualCloudControlAssessmentDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManualCloudControlAssessmentDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.manualCloudControlGuide != null && message.manualCloudControlGuide.length) - for (var i = 0; i < message.manualCloudControlGuide.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.manualCloudControlGuide[i]); - return writer; - }; - - /** - * Encodes the specified ManualCloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IManualCloudControlAssessmentDetails} message ManualCloudControlAssessmentDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManualCloudControlAssessmentDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManualCloudControlAssessmentDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.manualCloudControlGuide && message.manualCloudControlGuide.length)) - message.manualCloudControlGuide = []; - message.manualCloudControlGuide.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManualCloudControlAssessmentDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManualCloudControlAssessmentDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManualCloudControlAssessmentDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManualCloudControlAssessmentDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.manualCloudControlGuide != null && message.hasOwnProperty("manualCloudControlGuide")) { - if (!Array.isArray(message.manualCloudControlGuide)) - return "manualCloudControlGuide: array expected"; - for (var i = 0; i < message.manualCloudControlGuide.length; ++i) - if (!$util.isString(message.manualCloudControlGuide[i])) - return "manualCloudControlGuide: string[] expected"; - } - return null; - }; - - /** - * Creates a ManualCloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} ManualCloudControlAssessmentDetails - */ - ManualCloudControlAssessmentDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails(); - if (object.manualCloudControlGuide) { - if (!Array.isArray(object.manualCloudControlGuide)) - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails.manualCloudControlGuide: array expected"); - message.manualCloudControlGuide = []; - for (var i = 0; i < object.manualCloudControlGuide.length; ++i) - message.manualCloudControlGuide[i] = String(object.manualCloudControlGuide[i]); - } - return message; - }; - - /** - * Creates a plain object from a ManualCloudControlAssessmentDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails} message ManualCloudControlAssessmentDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManualCloudControlAssessmentDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.manualCloudControlGuide = []; - if (message.manualCloudControlGuide && message.manualCloudControlGuide.length) { - object.manualCloudControlGuide = []; - for (var j = 0; j < message.manualCloudControlGuide.length; ++j) - object.manualCloudControlGuide[j] = message.manualCloudControlGuide[j]; - } - return object; - }; - - /** - * Converts this ManualCloudControlAssessmentDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @instance - * @returns {Object.} JSON object - */ - ManualCloudControlAssessmentDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManualCloudControlAssessmentDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManualCloudControlAssessmentDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails"; - }; - - return ManualCloudControlAssessmentDetails; - })(); - - v1.CloudControlAssessmentDetails = (function() { - - /** - * Properties of a CloudControlAssessmentDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ICloudControlAssessmentDetails - * @property {number|null} [findingsCount] CloudControlAssessmentDetails findingsCount - * @property {google.cloud.cloudsecuritycompliance.v1.EvaluationState|null} [evaluationState] CloudControlAssessmentDetails evaluationState - */ - - /** - * Constructs a new CloudControlAssessmentDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a CloudControlAssessmentDetails. - * @implements ICloudControlAssessmentDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails=} [properties] Properties to set - */ - function CloudControlAssessmentDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudControlAssessmentDetails findingsCount. - * @member {number} findingsCount - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @instance - */ - CloudControlAssessmentDetails.prototype.findingsCount = 0; - - /** - * CloudControlAssessmentDetails evaluationState. - * @member {google.cloud.cloudsecuritycompliance.v1.EvaluationState} evaluationState - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @instance - */ - CloudControlAssessmentDetails.prototype.evaluationState = 0; - - /** - * Creates a new CloudControlAssessmentDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails instance - */ - CloudControlAssessmentDetails.create = function create(properties) { - return new CloudControlAssessmentDetails(properties); - }; - - /** - * Encodes the specified CloudControlAssessmentDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails} message CloudControlAssessmentDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlAssessmentDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.findingsCount != null && Object.hasOwnProperty.call(message, "findingsCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.findingsCount); - if (message.evaluationState != null && Object.hasOwnProperty.call(message, "evaluationState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.evaluationState); - return writer; - }; - - /** - * Encodes the specified CloudControlAssessmentDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ICloudControlAssessmentDetails} message CloudControlAssessmentDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudControlAssessmentDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlAssessmentDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.findingsCount = reader.int32(); - break; - } - case 2: { - message.evaluationState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudControlAssessmentDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudControlAssessmentDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudControlAssessmentDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudControlAssessmentDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.findingsCount != null && message.hasOwnProperty("findingsCount")) - if (!$util.isInteger(message.findingsCount)) - return "findingsCount: integer expected"; - if (message.evaluationState != null && message.hasOwnProperty("evaluationState")) - switch (message.evaluationState) { - default: - return "evaluationState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a CloudControlAssessmentDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} CloudControlAssessmentDetails - */ - CloudControlAssessmentDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails(); - if (object.findingsCount != null) - message.findingsCount = object.findingsCount | 0; - switch (object.evaluationState) { - default: - if (typeof object.evaluationState === "number") { - message.evaluationState = object.evaluationState; - break; - } - break; - case "EVALUATION_STATE_UNSPECIFIED": - case 0: - message.evaluationState = 0; - break; - case "EVALUATION_STATE_PASSED": - case 1: - message.evaluationState = 1; - break; - case "EVALUATION_STATE_FAILED": - case 2: - message.evaluationState = 2; - break; - case "EVALUATION_STATE_NOT_ASSESSED": - case 3: - message.evaluationState = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a CloudControlAssessmentDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails} message CloudControlAssessmentDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudControlAssessmentDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.findingsCount = 0; - object.evaluationState = options.enums === String ? "EVALUATION_STATE_UNSPECIFIED" : 0; - } - if (message.findingsCount != null && message.hasOwnProperty("findingsCount")) - object.findingsCount = message.findingsCount; - if (message.evaluationState != null && message.hasOwnProperty("evaluationState")) - object.evaluationState = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.evaluationState] === undefined ? message.evaluationState : $root.google.cloud.cloudsecuritycompliance.v1.EvaluationState[message.evaluationState] : message.evaluationState; - return object; - }; - - /** - * Converts this CloudControlAssessmentDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @instance - * @returns {Object.} JSON object - */ - CloudControlAssessmentDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudControlAssessmentDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudControlAssessmentDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails"; - }; - - return CloudControlAssessmentDetails; - })(); - - v1.SimilarControls = (function() { - - /** - * Properties of a SimilarControls. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ISimilarControls - * @property {string|null} [framework] SimilarControls framework - * @property {string|null} [controlId] SimilarControls controlId - */ - - /** - * Constructs a new SimilarControls. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a SimilarControls. - * @implements ISimilarControls - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls=} [properties] Properties to set - */ - function SimilarControls(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimilarControls framework. - * @member {string} framework - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @instance - */ - SimilarControls.prototype.framework = ""; - - /** - * SimilarControls controlId. - * @member {string} controlId - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @instance - */ - SimilarControls.prototype.controlId = ""; - - /** - * Creates a new SimilarControls instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls instance - */ - SimilarControls.create = function create(properties) { - return new SimilarControls(properties); - }; - - /** - * Encodes the specified SimilarControls message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls} message SimilarControls message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimilarControls.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.framework != null && Object.hasOwnProperty.call(message, "framework")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.framework); - if (message.controlId != null && Object.hasOwnProperty.call(message, "controlId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.controlId); - return writer; - }; - - /** - * Encodes the specified SimilarControls message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.SimilarControls.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ISimilarControls} message SimilarControls message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimilarControls.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimilarControls message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimilarControls.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.framework = reader.string(); - break; - } - case 2: { - message.controlId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimilarControls message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimilarControls.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimilarControls message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimilarControls.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.framework != null && message.hasOwnProperty("framework")) - if (!$util.isString(message.framework)) - return "framework: string expected"; - if (message.controlId != null && message.hasOwnProperty("controlId")) - if (!$util.isString(message.controlId)) - return "controlId: string expected"; - return null; - }; - - /** - * Creates a SimilarControls message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.SimilarControls} SimilarControls - */ - SimilarControls.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.SimilarControls(); - if (object.framework != null) - message.framework = String(object.framework); - if (object.controlId != null) - message.controlId = String(object.controlId); - return message; - }; - - /** - * Creates a plain object from a SimilarControls message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.SimilarControls} message SimilarControls - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimilarControls.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.framework = ""; - object.controlId = ""; - } - if (message.framework != null && message.hasOwnProperty("framework")) - object.framework = message.framework; - if (message.controlId != null && message.hasOwnProperty("controlId")) - object.controlId = message.controlId; - return object; - }; - - /** - * Converts this SimilarControls to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @instance - * @returns {Object.} JSON object - */ - SimilarControls.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SimilarControls - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.SimilarControls - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimilarControls.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.SimilarControls"; - }; - - return SimilarControls; - })(); - - v1.AggregatedComplianceReport = (function() { - - /** - * Properties of an AggregatedComplianceReport. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface IAggregatedComplianceReport - * @property {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null} [controlAssessmentDetails] AggregatedComplianceReport controlAssessmentDetails - * @property {google.protobuf.ITimestamp|null} [reportTime] AggregatedComplianceReport reportTime - */ - - /** - * Constructs a new AggregatedComplianceReport. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents an AggregatedComplianceReport. - * @implements IAggregatedComplianceReport - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport=} [properties] Properties to set - */ - function AggregatedComplianceReport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AggregatedComplianceReport controlAssessmentDetails. - * @member {google.cloud.cloudsecuritycompliance.v1.IControlAssessmentDetails|null|undefined} controlAssessmentDetails - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @instance - */ - AggregatedComplianceReport.prototype.controlAssessmentDetails = null; - - /** - * AggregatedComplianceReport reportTime. - * @member {google.protobuf.ITimestamp|null|undefined} reportTime - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @instance - */ - AggregatedComplianceReport.prototype.reportTime = null; - - /** - * Creates a new AggregatedComplianceReport instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport instance - */ - AggregatedComplianceReport.create = function create(properties) { - return new AggregatedComplianceReport(properties); - }; - - /** - * Encodes the specified AggregatedComplianceReport message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport} message AggregatedComplianceReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregatedComplianceReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.controlAssessmentDetails != null && Object.hasOwnProperty.call(message, "controlAssessmentDetails")) - $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.encode(message.controlAssessmentDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.reportTime != null && Object.hasOwnProperty.call(message, "reportTime")) - $root.google.protobuf.Timestamp.encode(message.reportTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AggregatedComplianceReport message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.IAggregatedComplianceReport} message AggregatedComplianceReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregatedComplianceReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AggregatedComplianceReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregatedComplianceReport.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.decode(reader, reader.uint32()); - break; - } - case 2: { - message.reportTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AggregatedComplianceReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregatedComplianceReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AggregatedComplianceReport message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AggregatedComplianceReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) { - var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.verify(message.controlAssessmentDetails); - if (error) - return "controlAssessmentDetails." + error; - } - if (message.reportTime != null && message.hasOwnProperty("reportTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.reportTime); - if (error) - return "reportTime." + error; - } - return null; - }; - - /** - * Creates an AggregatedComplianceReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} AggregatedComplianceReport - */ - AggregatedComplianceReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport(); - if (object.controlAssessmentDetails != null) { - if (typeof object.controlAssessmentDetails !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.controlAssessmentDetails: object expected"); - message.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.fromObject(object.controlAssessmentDetails); - } - if (object.reportTime != null) { - if (typeof object.reportTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport.reportTime: object expected"); - message.reportTime = $root.google.protobuf.Timestamp.fromObject(object.reportTime); - } - return message; - }; - - /** - * Creates a plain object from an AggregatedComplianceReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport} message AggregatedComplianceReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AggregatedComplianceReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.controlAssessmentDetails = null; - object.reportTime = null; - } - if (message.controlAssessmentDetails != null && message.hasOwnProperty("controlAssessmentDetails")) - object.controlAssessmentDetails = $root.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails.toObject(message.controlAssessmentDetails, options); - if (message.reportTime != null && message.hasOwnProperty("reportTime")) - object.reportTime = $root.google.protobuf.Timestamp.toObject(message.reportTime, options); - return object; - }; - - /** - * Converts this AggregatedComplianceReport to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @instance - * @returns {Object.} JSON object - */ - AggregatedComplianceReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AggregatedComplianceReport - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AggregatedComplianceReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport"; - }; - - return AggregatedComplianceReport; - })(); - - v1.TargetResourceDetails = (function() { - - /** - * Properties of a TargetResourceDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ITargetResourceDetails - * @property {string|null} [frameworkDeployment] TargetResourceDetails frameworkDeployment - * @property {string|null} [targetResourceDisplayName] TargetResourceDetails targetResourceDisplayName - * @property {string|null} [targetResource] TargetResourceDetails targetResource - * @property {google.protobuf.ITimestamp|null} [createTime] TargetResourceDetails createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] TargetResourceDetails updateTime - * @property {number|Long|null} [majorRevisionId] TargetResourceDetails majorRevisionId - * @property {number|Long|null} [minorRevisionId] TargetResourceDetails minorRevisionId - */ - - /** - * Constructs a new TargetResourceDetails. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a TargetResourceDetails. - * @implements ITargetResourceDetails - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails=} [properties] Properties to set - */ - function TargetResourceDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TargetResourceDetails frameworkDeployment. - * @member {string} frameworkDeployment - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - */ - TargetResourceDetails.prototype.frameworkDeployment = ""; - - /** - * TargetResourceDetails targetResourceDisplayName. - * @member {string} targetResourceDisplayName - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - */ - TargetResourceDetails.prototype.targetResourceDisplayName = ""; - - /** - * TargetResourceDetails targetResource. - * @member {string} targetResource - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - */ - TargetResourceDetails.prototype.targetResource = ""; - - /** - * TargetResourceDetails createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - */ - TargetResourceDetails.prototype.createTime = null; - - /** - * TargetResourceDetails updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - */ - TargetResourceDetails.prototype.updateTime = null; - - /** - * TargetResourceDetails majorRevisionId. - * @member {number|Long} majorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - */ - TargetResourceDetails.prototype.majorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TargetResourceDetails minorRevisionId. - * @member {number|Long} minorRevisionId - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - */ - TargetResourceDetails.prototype.minorRevisionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new TargetResourceDetails instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails instance - */ - TargetResourceDetails.create = function create(properties) { - return new TargetResourceDetails(properties); - }; - - /** - * Encodes the specified TargetResourceDetails message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails} message TargetResourceDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResourceDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.frameworkDeployment != null && Object.hasOwnProperty.call(message, "frameworkDeployment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.frameworkDeployment); - if (message.targetResourceDisplayName != null && Object.hasOwnProperty.call(message, "targetResourceDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetResourceDisplayName); - if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetResource); - 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.majorRevisionId != null && Object.hasOwnProperty.call(message, "majorRevisionId")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.majorRevisionId); - if (message.minorRevisionId != null && Object.hasOwnProperty.call(message, "minorRevisionId")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.minorRevisionId); - return writer; - }; - - /** - * Encodes the specified TargetResourceDetails message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails} message TargetResourceDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResourceDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetResourceDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResourceDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.frameworkDeployment = reader.string(); - break; - } - case 2: { - message.targetResourceDisplayName = reader.string(); - break; - } - case 3: { - message.targetResource = 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: { - message.majorRevisionId = reader.int64(); - break; - } - case 7: { - message.minorRevisionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetResourceDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResourceDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetResourceDetails message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetResourceDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) - if (!$util.isString(message.frameworkDeployment)) - return "frameworkDeployment: string expected"; - if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) - if (!$util.isString(message.targetResourceDisplayName)) - return "targetResourceDisplayName: string expected"; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - if (!$util.isString(message.targetResource)) - return "targetResource: 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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (!$util.isInteger(message.majorRevisionId) && !(message.majorRevisionId && $util.isInteger(message.majorRevisionId.low) && $util.isInteger(message.majorRevisionId.high))) - return "majorRevisionId: integer|Long expected"; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (!$util.isInteger(message.minorRevisionId) && !(message.minorRevisionId && $util.isInteger(message.minorRevisionId.low) && $util.isInteger(message.minorRevisionId.high))) - return "minorRevisionId: integer|Long expected"; - return null; - }; - - /** - * Creates a TargetResourceDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} TargetResourceDetails - */ - TargetResourceDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails(); - if (object.frameworkDeployment != null) - message.frameworkDeployment = String(object.frameworkDeployment); - if (object.targetResourceDisplayName != null) - message.targetResourceDisplayName = String(object.targetResourceDisplayName); - if (object.targetResource != null) - message.targetResource = String(object.targetResource); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.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.cloudsecuritycompliance.v1.TargetResourceDetails.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.majorRevisionId != null) - if ($util.Long) - (message.majorRevisionId = $util.Long.fromValue(object.majorRevisionId)).unsigned = false; - else if (typeof object.majorRevisionId === "string") - message.majorRevisionId = parseInt(object.majorRevisionId, 10); - else if (typeof object.majorRevisionId === "number") - message.majorRevisionId = object.majorRevisionId; - else if (typeof object.majorRevisionId === "object") - message.majorRevisionId = new $util.LongBits(object.majorRevisionId.low >>> 0, object.majorRevisionId.high >>> 0).toNumber(); - if (object.minorRevisionId != null) - if ($util.Long) - (message.minorRevisionId = $util.Long.fromValue(object.minorRevisionId)).unsigned = false; - else if (typeof object.minorRevisionId === "string") - message.minorRevisionId = parseInt(object.minorRevisionId, 10); - else if (typeof object.minorRevisionId === "number") - message.minorRevisionId = object.minorRevisionId; - else if (typeof object.minorRevisionId === "object") - message.minorRevisionId = new $util.LongBits(object.minorRevisionId.low >>> 0, object.minorRevisionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a TargetResourceDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails} message TargetResourceDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetResourceDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.frameworkDeployment = ""; - object.targetResourceDisplayName = ""; - object.targetResource = ""; - object.createTime = null; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.majorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.majorRevisionId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.minorRevisionId = options.longs === String ? "0" : 0; - } - if (message.frameworkDeployment != null && message.hasOwnProperty("frameworkDeployment")) - object.frameworkDeployment = message.frameworkDeployment; - if (message.targetResourceDisplayName != null && message.hasOwnProperty("targetResourceDisplayName")) - object.targetResourceDisplayName = message.targetResourceDisplayName; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - object.targetResource = message.targetResource; - 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.majorRevisionId != null && message.hasOwnProperty("majorRevisionId")) - if (typeof message.majorRevisionId === "number") - object.majorRevisionId = options.longs === String ? String(message.majorRevisionId) : message.majorRevisionId; - else - object.majorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.majorRevisionId) : options.longs === Number ? new $util.LongBits(message.majorRevisionId.low >>> 0, message.majorRevisionId.high >>> 0).toNumber() : message.majorRevisionId; - if (message.minorRevisionId != null && message.hasOwnProperty("minorRevisionId")) - if (typeof message.minorRevisionId === "number") - object.minorRevisionId = options.longs === String ? String(message.minorRevisionId) : message.minorRevisionId; - else - object.minorRevisionId = options.longs === String ? $util.Long.prototype.toString.call(message.minorRevisionId) : options.longs === Number ? new $util.LongBits(message.minorRevisionId.low >>> 0, message.minorRevisionId.high >>> 0).toNumber() : message.minorRevisionId; - return object; - }; - - /** - * Converts this TargetResourceDetails to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @instance - * @returns {Object.} JSON object - */ - TargetResourceDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetResourceDetails - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetResourceDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails"; - }; - - return TargetResourceDetails; - })(); - - v1.Trend = (function() { - - /** - * Properties of a Trend. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @interface ITrend - * @property {google.protobuf.IDuration|null} [duration] Trend duration - * @property {number|null} [valuePercent] Trend valuePercent - */ - - /** - * Constructs a new Trend. - * @memberof google.cloud.cloudsecuritycompliance.v1 - * @classdesc Represents a Trend. - * @implements ITrend - * @constructor - * @param {google.cloud.cloudsecuritycompliance.v1.ITrend=} [properties] Properties to set - */ - function Trend(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Trend duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @instance - */ - Trend.prototype.duration = null; - - /** - * Trend valuePercent. - * @member {number} valuePercent - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @instance - */ - Trend.prototype.valuePercent = 0; - - /** - * Creates a new Trend instance using the specified properties. - * @function create - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITrend=} [properties] Properties to set - * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend instance - */ - Trend.create = function create(properties) { - return new Trend(properties); - }; - - /** - * Encodes the specified Trend message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. - * @function encode - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITrend} message Trend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.valuePercent != null && Object.hasOwnProperty.call(message, "valuePercent")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.valuePercent); - return writer; - }; - - /** - * Encodes the specified Trend message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.ITrend} message Trend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Trend message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trend.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Trend(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.valuePercent = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Trend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Trend message. - * @function verify - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Trend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.valuePercent != null && message.hasOwnProperty("valuePercent")) - if (typeof message.valuePercent !== "number") - return "valuePercent: number expected"; - return null; - }; - - /** - * Creates a Trend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend - */ - Trend.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Trend) - return object; - var message = new $root.google.cloud.cloudsecuritycompliance.v1.Trend(); - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Trend.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.valuePercent != null) - message.valuePercent = Number(object.valuePercent); - return message; - }; - - /** - * Creates a plain object from a Trend message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {google.cloud.cloudsecuritycompliance.v1.Trend} message Trend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Trend.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.duration = null; - object.valuePercent = 0; - } - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.valuePercent != null && message.hasOwnProperty("valuePercent")) - object.valuePercent = options.json && !isFinite(message.valuePercent) ? String(message.valuePercent) : message.valuePercent; - return object; - }; - - /** - * Converts this Trend to JSON. - * @function toJSON - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @instance - * @returns {Object.} JSON object - */ - Trend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Trend - * @function getTypeUrl - * @memberof google.cloud.cloudsecuritycompliance.v1.Trend - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Trend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Trend"; - }; - - return Trend; - })(); - - return v1; - })(); - - return cloudsecuritycompliance; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - 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.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - 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.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - 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.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.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.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * 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 - * @property {number} IDENTIFIER=8 IDENTIFIER 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; - values[valuesById[8] = "IDENTIFIER"] = 8; - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - 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); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * 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 = []; - this.declaration = []; - if (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; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * 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.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - 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 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - 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; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - 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]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - 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.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [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 {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @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 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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * 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.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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - 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 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 50: { - message.features = $root.google.protobuf.FeatureSet.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; - } - 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.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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @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 deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - 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 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.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; - } - 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @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.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * 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.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - 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) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.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; - } - 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.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - 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) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - 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.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.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; - } - } - 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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 (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @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 deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * 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.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.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; - } - } - 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.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - 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; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @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 - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * 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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * 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"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - 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"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - 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; - } - case 525000001: { - message[".google.api.apiVersion"] = 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - 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.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @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 features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * 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.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.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; - } - 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - 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) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - 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.features = null; - 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] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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 >= 0) - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length, error) { - 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(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - 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, error) { - 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(); - if (tag === error) - break; - 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); - }; - - /** - * 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; - })(); - - return rpc; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Interval = (function() { - - /** - * Properties of an Interval. - * @memberof google.type - * @interface IInterval - * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Interval endTime - */ - - /** - * Constructs a new Interval. - * @memberof google.type - * @classdesc Represents an Interval. - * @implements IInterval - * @constructor - * @param {google.type.IInterval=} [properties] Properties to set - */ - function Interval(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Interval startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.type.Interval - * @instance - */ - Interval.prototype.startTime = null; - - /** - * Interval endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.type.Interval - * @instance - */ - Interval.prototype.endTime = null; - - /** - * Creates a new Interval instance using the specified properties. - * @function create - * @memberof google.type.Interval - * @static - * @param {google.type.IInterval=} [properties] Properties to set - * @returns {google.type.Interval} Interval instance - */ - Interval.create = function create(properties) { - return new Interval(properties); - }; - - /** - * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. - * @function encode - * @memberof google.type.Interval - * @static - * @param {google.type.IInterval} message Interval message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Interval.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, 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(); - return writer; - }; - - /** - * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Interval - * @static - * @param {google.type.IInterval} message Interval message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Interval.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Interval message from the specified reader or buffer. - * @function decode - * @memberof google.type.Interval - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Interval} Interval - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Interval.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Interval(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Interval message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Interval - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Interval} Interval - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Interval.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Interval message. - * @function verify - * @memberof google.type.Interval - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Interval.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - return null; - }; - - /** - * Creates an Interval message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Interval - * @static - * @param {Object.} object Plain object - * @returns {google.type.Interval} Interval - */ - Interval.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Interval) - return object; - var message = new $root.google.type.Interval(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.type.Interval.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.type.Interval.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from an Interval message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Interval - * @static - * @param {google.type.Interval} message Interval - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Interval.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - return object; - }; - - /** - * Converts this Interval to JSON. - * @function toJSON - * @memberof google.type.Interval - * @instance - * @returns {Object.} JSON object - */ - Interval.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Interval - * @function getTypeUrl - * @memberof google.type.Interval - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Interval"; - }; - - return Interval; - })(); - - return type; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json deleted file mode 100644 index a18874f53aa..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/protos/protos.json +++ /dev/null @@ -1,5937 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "cloudsecuritycompliance": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.CloudSecurityCompliance.V1", - "go_package": "cloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb", - "java_multiple_files": true, - "java_outer_classname": "MonitoringProto", - "java_package": "com.google.cloud.cloudsecuritycompliance.v1", - "php_namespace": "Google\\Cloud\\CloudSecurityCompliance\\V1", - "ruby_package": "Google::Cloud::CloudSecurityCompliance::V1", - "(google.api.resource_definition).type": "cloudsecuritycompliance.googleapis.com/FolderLocation", - "(google.api.resource_definition).pattern": "folders/{folder}/locations/{location}" - }, - "nested": { - "Audit": { - "options": { - "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "GenerateFrameworkAuditScopeReport": { - "requestType": "GenerateFrameworkAuditScopeReportRequest", - "responseType": "GenerateFrameworkAuditScopeReportResponse", - "options": { - "(google.api.http).post": "/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "scope,report_format,compliance_framework" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - "body": "*", - "additional_bindings": [ - { - "post": "/v1/{scope=projects/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - "body": "*" - }, - { - "post": "/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - "body": "*" - } - ] - } - }, - { - "(google.api.method_signature)": "scope,report_format,compliance_framework" - } - ] - }, - "CreateFrameworkAudit": { - "requestType": "CreateFrameworkAuditRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", - "(google.api.http).body": "framework_audit", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworkAudits", - "(google.api.http).additional_bindings.body": "framework_audit", - "(google.api.method_signature)": "parent,framework_audit,framework_audit_id", - "(google.longrunning.operation_info).response_type": "FrameworkAudit", - "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", - "body": "framework_audit", - "additional_bindings": [ - { - "post": "/v1/{parent=folders/*/locations/*}/frameworkAudits", - "body": "framework_audit" - }, - { - "post": "/v1/{parent=projects/*/locations/*}/frameworkAudits", - "body": "framework_audit" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,framework_audit,framework_audit_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "FrameworkAudit", - "metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - } - } - ] - }, - "ListFrameworkAudits": { - "requestType": "ListFrameworkAuditsRequest", - "responseType": "ListFrameworkAuditsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworkAudits", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/frameworkAudits", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/frameworkAudits" - }, - { - "get": "/v1/{parent=projects/*/locations/*}/frameworkAudits" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetFrameworkAudit": { - "requestType": "GetFrameworkAuditRequest", - "responseType": "FrameworkAudit", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkAudits/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkAudits/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/frameworkAudits/*}", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/frameworkAudits/*}" - }, - { - "get": "/v1/{name=projects/*/locations/*/frameworkAudits/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "ComplianceState": { - "values": { - "COMPLIANCE_STATE_UNSPECIFIED": 0, - "COMPLIANT": 1, - "VIOLATION": 2, - "MANUAL_REVIEW_NEEDED": 3, - "ERROR": 4, - "AUDIT_NOT_SUPPORTED": 5 - } - }, - "GenerateFrameworkAuditScopeReportRequest": { - "fields": { - "scope": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "reportFormat": { - "type": "Format", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "complianceFramework": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "ODF": 1 - } - } - } - }, - "GenerateFrameworkAuditScopeReportResponse": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/GenerateFrameworkAuditScopeReportResponse", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}", - "(google.api.resource).plural": "frameworkAuditScopeReports", - "(google.api.resource).singular": "generateFrameworkAuditScopeReportResponse" - }, - "oneofs": { - "auditReport": { - "oneof": [ - "scopeReportContents" - ] - } - }, - "fields": { - "scopeReportContents": { - "type": "bytes", - "id": 3 - }, - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "complianceFramework": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ReportSummary": { - "fields": { - "totalCount": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "compliantCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "violationCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "manualReviewNeededCount": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorCount": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateFrameworkAuditRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit" - } - }, - "frameworkAuditId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "frameworkAudit": { - "type": "FrameworkAudit", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "FrameworkAuditDestination": { - "oneofs": { - "destinationType": { - "oneof": [ - "bucket" - ] - } - }, - "fields": { - "bucket": { - "type": "BucketDestination", - "id": 1 - } - } - }, - "BucketDestination": { - "fields": { - "bucketUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "frameworkAuditFormat": { - "type": "Format", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "ODF": 1 - } - } - } - }, - "FrameworkAudit": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}", - "(google.api.resource).plural": "frameworkAudits", - "(google.api.resource).singular": "frameworkAudit" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "frameworkAuditId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "complianceFramework": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "scope": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "frameworkAuditDestination": { - "type": "FrameworkAuditDestination", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "finishTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "complianceState": { - "type": "ComplianceState", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reportSummary": { - "type": "ReportSummary", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudControlGroupAuditDetails": { - "rule": "repeated", - "type": "CloudControlGroupAuditDetails", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudControlAuditDetails": { - "rule": "repeated", - "type": "CloudControlAuditDetails", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "operationId": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SCHEDULED": 1, - "RUNNING": 2, - "UPLOADING": 3, - "FAILED": 4, - "SUCCEEDED": 5 - } - } - } - }, - "ListFrameworkAuditsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit" - } - }, - "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" - } - } - } - }, - "ListFrameworkAuditsResponse": { - "fields": { - "frameworkAudits": { - "rule": "repeated", - "type": "FrameworkAudit", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetFrameworkAuditRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkAudit" - } - } - } - }, - "CloudControlGroupAuditDetails": { - "fields": { - "cloudControlGroupId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "responsibilityType": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "googleResponsibilityDescription": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "googleResponsibilityImplementation": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "customerResponsibilityDescription": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "customerResponsibilityImplementation": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "complianceState": { - "type": "ComplianceState", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "controlId": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "controlFamily": { - "type": "ControlFamily", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudControlDetails": { - "rule": "repeated", - "type": "CloudControlAuditDetails", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reportSummary": { - "type": "ReportSummary", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "FindingDetails": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "complianceState": { - "type": "ComplianceState", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "observation": { - "type": "ObservationDetails", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "evidence": { - "type": "EvidenceDetails", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ObservationDetails": { - "fields": { - "currentValue": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "expectedValue": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "guidance": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "EvidenceDetails": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "service": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "evidencePath": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CloudControlAuditDetails": { - "fields": { - "cloudControl": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudControlId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudControlDescription": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "complianceState": { - "type": "ComplianceState", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reportSummary": { - "type": "ReportSummary", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "findings": { - "rule": "repeated", - "type": "FindingDetails", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "RegulatoryControlResponsibilityType": { - "values": { - "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED": 0, - "GOOGLE": 1, - "CUSTOMER": 2, - "SHARED": 3 - } - }, - "EnforcementMode": { - "values": { - "ENFORCEMENT_MODE_UNSPECIFIED": 0, - "PREVENTIVE": 1, - "DETECTIVE": 2, - "AUDIT": 3 - } - }, - "FrameworkCategory": { - "values": { - "FRAMEWORK_CATEGORY_UNSPECIFIED": 0, - "INDUSTRY_DEFINED_STANDARD": 1, - "ASSURED_WORKLOADS": 2, - "DATA_SECURITY": 3, - "GOOGLE_BEST_PRACTICES": 4, - "CUSTOM_FRAMEWORK": 5 - } - }, - "CloudControlCategory": { - "values": { - "CLOUD_CONTROL_CATEGORY_UNSPECIFIED": 0, - "CC_CATEGORY_INFRASTRUCTURE": 1, - "CC_CATEGORY_ARTIFICIAL_INTELLIGENCE": 2, - "CC_CATEGORY_PHYSICAL_SECURITY": 3, - "CC_CATEGORY_DATA_SECURITY": 4, - "CC_CATEGORY_NETWORK_SECURITY": 5, - "CC_CATEGORY_INCIDENT_MANAGEMENT": 6, - "CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT": 7, - "CC_CATEGORY_ENCRYPTION": 8, - "CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE": 9, - "CC_CATEGORY_HR_ADMIN_AND_PROCESSES": 10, - "CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT": 11, - "CC_CATEGORY_LEGAL_AND_DISCLOSURES": 12, - "CC_CATEGORY_VULNERABILITY_MANAGEMENT": 13, - "CC_CATEGORY_PRIVACY": 14, - "CC_CATEGORY_BCDR": 15, - "CC_CATEGORY_ADMIN_ACCESS": 16, - "CC_CATEGORY_DATA_RESIDENCY": 17, - "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION": 18, - "CC_CATEGORY_SERVICE_SPECIFIC": 19 - } - }, - "CloudProvider": { - "values": { - "CLOUD_PROVIDER_UNSPECIFIED": 0, - "AWS": 1, - "AZURE": 2, - "GCP": 3 - } - }, - "Severity": { - "values": { - "SEVERITY_UNSPECIFIED": 0, - "CRITICAL": 1, - "HIGH": 2, - "MEDIUM": 3, - "LOW": 4 - } - }, - "RuleActionType": { - "values": { - "RULE_ACTION_TYPE_UNSPECIFIED": 0, - "RULE_ACTION_TYPE_PREVENTIVE": 1, - "RULE_ACTION_TYPE_DETECTIVE": 2, - "RULE_ACTION_TYPE_AUDIT": 3 - } - }, - "TargetResourceType": { - "values": { - "TARGET_RESOURCE_TYPE_UNSPECIFIED": 0, - "TARGET_RESOURCE_CRM_TYPE_ORG": 1, - "TARGET_RESOURCE_CRM_TYPE_FOLDER": 2, - "TARGET_RESOURCE_CRM_TYPE_PROJECT": 3, - "TARGET_RESOURCE_TYPE_APPLICATION": 4 - } - }, - "Framework": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/Framework", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/frameworks/{framework}", - "(google.api.resource).plural": "frameworks", - "(google.api.resource).singular": "framework" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "FrameworkType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudControlDetails": { - "rule": "repeated", - "type": "CloudControlDetails", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "category": { - "rule": "repeated", - "type": "FrameworkCategory", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "supportedCloudProviders": { - "rule": "repeated", - "type": "CloudProvider", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "supportedTargetResourceTypes": { - "rule": "repeated", - "type": "TargetResourceType", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "supportedEnforcementModes": { - "rule": "repeated", - "type": "EnforcementMode", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "FrameworkType": { - "values": { - "FRAMEWORK_TYPE_UNSPECIFIED": 0, - "BUILT_IN": 1, - "CUSTOM": 2 - } - } - } - }, - "CloudControlDetails": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parameters": { - "rule": "repeated", - "type": "Parameter", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FrameworkReference": { - "oneofs": { - "_majorRevisionId": { - "oneof": [ - "majorRevisionId" - ] - } - }, - "fields": { - "framework": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/Framework" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "Parameter": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "parameterValue": { - "type": "ParamValue", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "CloudControl": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CloudControl", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/cloudControls/{cloud_control}", - "(google.api.resource).plural": "cloudControls", - "(google.api.resource).singular": "cloudControl" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "supportedEnforcementModes": { - "rule": "repeated", - "type": "EnforcementMode", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "parameterSpec": { - "rule": "repeated", - "type": "ParameterSpec", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rules": { - "rule": "repeated", - "type": "Rule", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "severity": { - "type": "Severity", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "findingCategory": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "supportedCloudProviders": { - "rule": "repeated", - "type": "CloudProvider", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "relatedFrameworks": { - "rule": "repeated", - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "remediationSteps": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "categories": { - "rule": "repeated", - "type": "CloudControlCategory", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "supportedTargetResourceTypes": { - "rule": "repeated", - "type": "TargetResourceType", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "CUSTOM": 1, - "BUILT_IN": 2 - } - } - } - }, - "ParameterSpec": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "isRequired": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "valueType": { - "type": "ValueType", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "defaultValue": { - "type": "ParamValue", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "substitutionRules": { - "rule": "repeated", - "type": "ParameterSubstitutionRule", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "subParameters": { - "rule": "repeated", - "type": "ParameterSpec", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validation": { - "type": "Validation", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "ValueType": { - "values": { - "VALUE_TYPE_UNSPECIFIED": 0, - "STRING": 3, - "BOOLEAN": 4, - "STRINGLIST": 5, - "NUMBER": 6, - "ONEOF": 7 - } - } - } - }, - "Validation": { - "oneofs": { - "constraint": { - "oneof": [ - "allowedValues", - "intRange", - "regexpPattern" - ] - } - }, - "fields": { - "allowedValues": { - "type": "AllowedValues", - "id": 1 - }, - "intRange": { - "type": "IntRange", - "id": 2 - }, - "regexpPattern": { - "type": "RegexpPattern", - "id": 3 - } - } - }, - "AllowedValues": { - "fields": { - "values": { - "rule": "repeated", - "type": "ParamValue", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "RegexpPattern": { - "fields": { - "pattern": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "IntRange": { - "fields": { - "min": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "max": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "StringList": { - "fields": { - "values": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ParamValue": { - "oneofs": { - "kind": { - "oneof": [ - "stringValue", - "boolValue", - "stringListValue", - "numberValue", - "oneofValue" - ] - } - }, - "fields": { - "stringValue": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "boolValue": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stringListValue": { - "type": "StringList", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "numberValue": { - "type": "double", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oneofValue": { - "type": "Parameter", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ParameterSubstitutionRule": { - "oneofs": { - "substitutionType": { - "oneof": [ - "placeholderSubstitutionRule", - "attributeSubstitutionRule" - ] - } - }, - "fields": { - "placeholderSubstitutionRule": { - "type": "PlaceholderSubstitutionRule", - "id": 1 - }, - "attributeSubstitutionRule": { - "type": "AttributeSubstitutionRule", - "id": 2 - } - } - }, - "AttributeSubstitutionRule": { - "fields": { - "attribute": { - "type": "string", - "id": 1 - } - } - }, - "PlaceholderSubstitutionRule": { - "fields": { - "attribute": { - "type": "string", - "id": 1 - } - } - }, - "Rule": { - "oneofs": { - "implementation": { - "oneof": [ - "celExpression" - ] - } - }, - "fields": { - "celExpression": { - "type": "CELExpression", - "id": 1 - }, - "description": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ruleActionTypes": { - "rule": "repeated", - "type": "RuleActionType", - "id": 16, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "CELExpression": { - "oneofs": { - "criteria": { - "oneof": [ - "resourceTypesValues" - ] - } - }, - "fields": { - "resourceTypesValues": { - "type": "StringList", - "id": 3 - }, - "expression": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "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" - } - } - } - }, - "Control": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/Control", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/controls/{control}", - "(google.api.resource).plural": "controls", - "(google.api.resource).singular": "control" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "family": { - "type": "Family", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "controlFamily": { - "type": "ControlFamily", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "responsibilityType": { - "type": "RegulatoryControlResponsibilityType", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "googleResponsibilityDescription": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "googleResponsibilityImplementation": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "customerResponsibilityDescription": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "customerResponsibilityImplementation": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "sharedResponsibilityDescription": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "additionalContentUri": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "relatedFrameworks": { - "rule": "repeated", - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Family": { - "values": { - "FAMILY_UNSPECIFIED": 0, - "AC": 1, - "AT": 2, - "AU": 3, - "CA": 4, - "CM": 5, - "CP": 6, - "IA": 7, - "IR": 8, - "MA": 9, - "MP": 10, - "PE": 11, - "PL": 12, - "PS": 13, - "RA": 14, - "SA": 15, - "SC": 16, - "SI": 17, - "SR": 18 - } - } - } - }, - "ControlFamily": { - "fields": { - "familyId": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - } - } - }, - "CmEnrollmentService": { - "options": { - "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "UpdateCmEnrollment": { - "requestType": "UpdateCmEnrollmentRequest", - "responseType": "CmEnrollment", - "options": { - "(google.api.http).patch": "/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}", - "(google.api.http).body": "cm_enrollment", - "(google.api.http).additional_bindings.patch": "/v1/{cm_enrollment.name=projects/*/locations/*/cmEnrollment}", - "(google.api.http).additional_bindings.body": "cm_enrollment", - "(google.api.method_signature)": "cm_enrollment,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}", - "body": "cm_enrollment", - "additional_bindings": [ - { - "patch": "/v1/{cm_enrollment.name=folders/*/locations/*/cmEnrollment}", - "body": "cm_enrollment" - }, - { - "patch": "/v1/{cm_enrollment.name=projects/*/locations/*/cmEnrollment}", - "body": "cm_enrollment" - } - ] - } - }, - { - "(google.api.method_signature)": "cm_enrollment,update_mask" - } - ] - }, - "CalculateEffectiveCmEnrollment": { - "requestType": "CalculateEffectiveCmEnrollmentRequest", - "responseType": "CalculateEffectiveCmEnrollmentResponse", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cmEnrollment}:calculate", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/cmEnrollment}:calculate" - }, - { - "get": "/v1/{name=projects/*/locations/*/cmEnrollment}:calculate" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "UpdateCmEnrollmentRequest": { - "fields": { - "cmEnrollment": { - "type": "CmEnrollment", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CalculateEffectiveCmEnrollmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CmEnrollment" - } - } - } - }, - "CmEnrollment": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CmEnrollment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/cmEnrollment", - "(google.api.resource).plural": "cmEnrollments", - "(google.api.resource).singular": "cmEnrollment" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "enrolled": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "auditConfig": { - "type": "AuditConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CalculateEffectiveCmEnrollmentResponse": { - "fields": { - "cmEnrollment": { - "type": "CmEnrollment", - "id": 1 - } - } - }, - "AuditConfig": { - "fields": { - "destinations": { - "rule": "repeated", - "type": "CmEligibleDestination", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "CmEligibleDestination": { - "oneofs": { - "cmEligibleDestinations": { - "oneof": [ - "gcsBucket" - ] - } - }, - "fields": { - "gcsBucket": { - "type": "string", - "id": 1 - } - } - } - } - }, - "Config": { - "options": { - "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListFrameworks": { - "requestType": "ListFrameworksRequest", - "responseType": "ListFrameworksResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworks", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworks", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/frameworks", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*}/frameworks" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetFramework": { - "requestType": "GetFrameworkRequest", - "responseType": "Framework", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworks/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/frameworks/*}", - "additional_bindings": { - "get": "/v1/{name=projects/*/locations/*/frameworks/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateFramework": { - "requestType": "CreateFrameworkRequest", - "responseType": "Framework", - "options": { - "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworks", - "(google.api.http).body": "framework", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworks", - "(google.api.http).additional_bindings.body": "framework", - "(google.api.method_signature)": "parent,framework,framework_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=organizations/*/locations/*}/frameworks", - "body": "framework", - "additional_bindings": { - "post": "/v1/{parent=projects/*/locations/*}/frameworks", - "body": "framework" - } - } - }, - { - "(google.api.method_signature)": "parent,framework,framework_id" - } - ] - }, - "UpdateFramework": { - "requestType": "UpdateFrameworkRequest", - "responseType": "Framework", - "options": { - "(google.api.http).patch": "/v1/{framework.name=organizations/*/locations/*/frameworks/*}", - "(google.api.http).body": "framework", - "(google.api.http).additional_bindings.patch": "/v1/{framework.name=projects/*/locations/*/frameworks/*}", - "(google.api.http).additional_bindings.body": "framework", - "(google.api.method_signature)": "framework,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{framework.name=organizations/*/locations/*/frameworks/*}", - "body": "framework", - "additional_bindings": { - "patch": "/v1/{framework.name=projects/*/locations/*/frameworks/*}", - "body": "framework" - } - } - }, - { - "(google.api.method_signature)": "framework,update_mask" - } - ] - }, - "DeleteFramework": { - "requestType": "DeleteFrameworkRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/frameworks/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/frameworks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=organizations/*/locations/*/frameworks/*}", - "additional_bindings": { - "delete": "/v1/{name=projects/*/locations/*/frameworks/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListCloudControls": { - "requestType": "ListCloudControlsRequest", - "responseType": "ListCloudControlsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/cloudControls", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/cloudControls", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/cloudControls", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*}/cloudControls" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetCloudControl": { - "requestType": "GetCloudControlRequest", - "responseType": "CloudControl", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cloudControls/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cloudControls/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/cloudControls/*}", - "additional_bindings": { - "get": "/v1/{name=projects/*/locations/*/cloudControls/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateCloudControl": { - "requestType": "CreateCloudControlRequest", - "responseType": "CloudControl", - "options": { - "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/cloudControls", - "(google.api.http).body": "cloud_control", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/cloudControls", - "(google.api.http).additional_bindings.body": "cloud_control", - "(google.api.method_signature)": "parent,cloud_control,cloud_control_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=organizations/*/locations/*}/cloudControls", - "body": "cloud_control", - "additional_bindings": { - "post": "/v1/{parent=projects/*/locations/*}/cloudControls", - "body": "cloud_control" - } - } - }, - { - "(google.api.method_signature)": "parent,cloud_control,cloud_control_id" - } - ] - }, - "UpdateCloudControl": { - "requestType": "UpdateCloudControlRequest", - "responseType": "CloudControl", - "options": { - "(google.api.http).patch": "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}", - "(google.api.http).body": "cloud_control", - "(google.api.http).additional_bindings.patch": "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}", - "(google.api.http).additional_bindings.body": "cloud_control", - "(google.api.method_signature)": "cloud_control,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}", - "body": "cloud_control", - "additional_bindings": { - "patch": "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}", - "body": "cloud_control" - } - } - }, - { - "(google.api.method_signature)": "cloud_control,update_mask" - } - ] - }, - "DeleteCloudControl": { - "requestType": "DeleteCloudControlRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/cloudControls/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/cloudControls/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=organizations/*/locations/*/cloudControls/*}", - "additional_bindings": { - "delete": "/v1/{name=projects/*/locations/*/cloudControls/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "ListFrameworksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/Framework" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListFrameworksResponse": { - "fields": { - "frameworks": { - "rule": "repeated", - "type": "Framework", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetFrameworkRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/Framework" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CreateFrameworkRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/Framework" - } - }, - "frameworkId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "framework": { - "type": "Framework", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateFrameworkRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "framework": { - "type": "Framework", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteFrameworkRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/Framework" - } - } - } - }, - "ListCloudControlsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/CloudControl" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListCloudControlsResponse": { - "fields": { - "cloudControls": { - "rule": "repeated", - "type": "CloudControl", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetCloudControlRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControl" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CreateCloudControlRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/CloudControl" - } - }, - "cloudControlId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "cloudControl": { - "type": "CloudControl", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateCloudControlRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudControl": { - "type": "CloudControl", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteCloudControlRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControl" - } - } - } - }, - "Deployment": { - "options": { - "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateFrameworkDeployment": { - "requestType": "CreateFrameworkDeploymentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", - "(google.api.http).body": "framework_deployment", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", - "(google.api.http).additional_bindings.body": "framework_deployment", - "(google.api.method_signature)": "parent,framework_deployment,framework_deployment_id", - "(google.longrunning.operation_info).response_type": "FrameworkDeployment", - "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", - "body": "framework_deployment", - "additional_bindings": { - "post": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", - "body": "framework_deployment" - } - } - }, - { - "(google.api.method_signature)": "parent,framework_deployment,framework_deployment_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "FrameworkDeployment", - "metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - } - } - ] - }, - "DeleteFrameworkDeployment": { - "requestType": "DeleteFrameworkDeploymentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", - "additional_bindings": { - "delete": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" - } - } - ] - }, - "GetFrameworkDeployment": { - "requestType": "GetFrameworkDeploymentRequest", - "responseType": "FrameworkDeployment", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", - "additional_bindings": { - "get": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListFrameworkDeployments": { - "requestType": "ListFrameworkDeploymentsRequest", - "responseType": "ListFrameworkDeploymentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*}/frameworkDeployments" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetCloudControlDeployment": { - "requestType": "GetCloudControlDeploymentRequest", - "responseType": "CloudControlDeployment", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}", - "additional_bindings": { - "get": "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListCloudControlDeployments": { - "requestType": "ListCloudControlDeploymentsRequest", - "responseType": "ListCloudControlDeploymentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/cloudControlDeployments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*}/cloudControlDeployments" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "DeploymentState": { - "values": { - "DEPLOYMENT_STATE_UNSPECIFIED": 0, - "DEPLOYMENT_STATE_VALIDATING": 1, - "DEPLOYMENT_STATE_CREATING": 2, - "DEPLOYMENT_STATE_DELETING": 3, - "DEPLOYMENT_STATE_UPDATING": 8, - "DEPLOYMENT_STATE_FAILED": 4, - "DEPLOYMENT_STATE_READY": 5, - "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED": 6, - "DEPLOYMENT_STATE_PARTIALLY_DELETED": 7 - } - }, - "FrameworkDeployment": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}", - "(google.api.resource).plural": "frameworkDeployments", - "(google.api.resource).singular": "frameworkDeployment" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "targetResourceConfig": { - "type": "TargetResourceConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "computedTargetResource": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "framework": { - "type": "FrameworkReference", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudControlMetadata": { - "rule": "repeated", - "type": "CloudControlMetadata", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "deploymentState": { - "type": "DeploymentState", - "id": 7, - "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" - } - }, - "etag": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "targetResourceDisplayName": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudControlDeploymentReferences": { - "rule": "repeated", - "type": "CloudControlDeploymentReference", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CloudControlDeployment": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}", - "(google.api.resource).plural": "cloudControlDeployments", - "(google.api.resource).singular": "cloudControlDeployment" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "targetResourceConfig": { - "type": "TargetResourceConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "targetResource": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudControlMetadata": { - "type": "CloudControlMetadata", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "deploymentState": { - "type": "DeploymentState", - "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" - } - }, - "etag": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "parameterSubstitutedCloudControl": { - "type": "CloudControl", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "frameworkDeploymentReferences": { - "rule": "repeated", - "type": "FrameworkDeploymentReference", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "targetResourceDisplayName": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "TargetResourceConfig": { - "oneofs": { - "resourceConfig": { - "oneof": [ - "existingTargetResource", - "targetResourceCreationConfig" - ] - } - }, - "fields": { - "existingTargetResource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "targetResourceCreationConfig": { - "type": "TargetResourceCreationConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TargetResourceCreationConfig": { - "oneofs": { - "resourceCreationConfig": { - "oneof": [ - "folderCreationConfig", - "projectCreationConfig" - ] - } - }, - "fields": { - "folderCreationConfig": { - "type": "FolderCreationConfig", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "projectCreationConfig": { - "type": "ProjectCreationConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FolderCreationConfig": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "folderDisplayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ProjectCreationConfig": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "projectDisplayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "billingAccountId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "CloudControlMetadata": { - "fields": { - "cloudControlDetails": { - "type": "CloudControlDetails", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "enforcementMode": { - "type": "EnforcementMode", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "CreateFrameworkDeploymentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - }, - "frameworkDeploymentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "frameworkDeployment": { - "type": "FrameworkDeployment", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteFrameworkDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetFrameworkDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - } - } - }, - "ListFrameworkDeploymentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - }, - "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" - } - } - } - }, - "ListFrameworkDeploymentsResponse": { - "fields": { - "frameworkDeployments": { - "rule": "repeated", - "type": "FrameworkDeployment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetCloudControlDeploymentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" - } - } - } - }, - "ListCloudControlDeploymentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" - } - }, - "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" - } - } - } - }, - "ListCloudControlDeploymentsResponse": { - "fields": { - "cloudControlDeployments": { - "rule": "repeated", - "type": "CloudControlDeployment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CloudControlDeploymentReference": { - "fields": { - "cloudControlDeployment": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" - } - } - } - }, - "FrameworkDeploymentReference": { - "fields": { - "frameworkDeployment": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" - } - }, - "frameworkReference": { - "type": "FrameworkReference", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "frameworkDisplayName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Monitoring": { - "options": { - "(google.api.default_host)": "cloudsecuritycompliance.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListFrameworkComplianceSummaries": { - "requestType": "ListFrameworkComplianceSummariesRequest", - "responseType": "ListFrameworkComplianceSummariesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummaries", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummaries", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/frameworkComplianceSummaries" - }, - { - "get": "/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "ListFindingSummaries": { - "requestType": "ListFindingSummariesRequest", - "responseType": "ListFindingSummariesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/findingSummaries", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/findingSummaries", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/findingSummaries", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/findingSummaries" - }, - { - "get": "/v1/{parent=projects/*/locations/*}/findingSummaries" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "FetchFrameworkComplianceReport": { - "requestType": "FetchFrameworkComplianceReportRequest", - "responseType": "FrameworkComplianceReport", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetch", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetch", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetch" - }, - { - "get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListControlComplianceSummaries": { - "requestType": "ListControlComplianceSummariesRequest", - "responseType": "ListControlComplianceSummariesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" - }, - { - "get": "/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "AggregateFrameworkComplianceReport": { - "requestType": "AggregateFrameworkComplianceReportRequest", - "responseType": "AggregateFrameworkComplianceReportResponse", - "options": { - "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregate", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregate", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregate" - }, - { - "get": "/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "EvaluationState": { - "values": { - "EVALUATION_STATE_UNSPECIFIED": 0, - "EVALUATION_STATE_PASSED": 1, - "EVALUATION_STATE_FAILED": 2, - "EVALUATION_STATE_NOT_ASSESSED": 3 - } - }, - "FindingClass": { - "values": { - "FINDING_CLASS_UNSPECIFIED": 0, - "THREAT": 1, - "VULNERABILITY": 2, - "MISCONFIGURATION": 3, - "OBSERVATION": 4, - "SCC_ERROR": 5, - "POSTURE_VIOLATION": 6, - "TOXIC_COMBINATION": 7, - "SENSITIVE_DATA_RISK": 8, - "CHOKEPOINT": 9 - } - }, - "FrameworkComplianceSummaryView": { - "values": { - "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED": 0, - "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC": 1, - "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL": 2 - } - }, - "ListFrameworkComplianceSummariesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary" - } - }, - "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" - } - }, - "view": { - "type": "FrameworkComplianceSummaryView", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListFrameworkComplianceSummariesResponse": { - "fields": { - "frameworkComplianceSummaries": { - "rule": "repeated", - "type": "FrameworkComplianceSummary", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "FrameworkComplianceReport": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}", - "(google.api.resource).plural": "frameworkComplianceReports", - "(google.api.resource).singular": "frameworkComplianceReport" - }, - "fields": { - "framework": { - "type": "string", - "id": 1 - }, - "frameworkDescription": { - "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "controlAssessmentDetails": { - "type": "ControlAssessmentDetails", - "id": 4 - }, - "frameworkType": { - "type": "Framework.FrameworkType", - "id": 5 - }, - "supportedCloudProviders": { - "rule": "repeated", - "type": "CloudProvider", - "id": 6 - }, - "frameworkCategories": { - "rule": "repeated", - "type": "FrameworkCategory", - "id": 7 - }, - "frameworkDisplayName": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "name": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 10 - }, - "minorRevisionId": { - "type": "int64", - "id": 11 - }, - "targetResourceDetails": { - "rule": "repeated", - "type": "TargetResourceDetails", - "id": 12 - } - } - }, - "FetchFrameworkComplianceReportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListFindingSummariesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/FindingSummary" - } - }, - "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" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListFindingSummariesResponse": { - "fields": { - "findingSummaries": { - "rule": "repeated", - "type": "FindingSummary", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListControlComplianceSummariesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListControlComplianceSummariesResponse": { - "fields": { - "controlComplianceSummaries": { - "rule": "repeated", - "type": "ControlComplianceSummary", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "AggregateFrameworkComplianceReportRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport" - } - }, - "interval": { - "type": "google.type.Interval", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AggregateFrameworkComplianceReportResponse": { - "fields": { - "aggregatedComplianceReports": { - "rule": "repeated", - "type": "AggregatedComplianceReport", - "id": 1 - } - } - }, - "ControlAssessmentDetails": { - "fields": { - "passingControls": { - "type": "int32", - "id": 1 - }, - "failingControls": { - "type": "int32", - "id": 2 - }, - "assessedPassingControls": { - "type": "int32", - "id": 3 - }, - "notAssessedControls": { - "type": "int32", - "id": 4 - } - } - }, - "FrameworkComplianceSummary": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}", - "(google.api.resource).plural": "frameworkComplianceSummaries", - "(google.api.resource).singular": "frameworkComplianceSummary" - }, - "fields": { - "framework": { - "type": "string", - "id": 1 - }, - "controlAssessmentDetails": { - "type": "ControlAssessmentDetails", - "id": 2 - }, - "frameworkType": { - "type": "Framework.FrameworkType", - "id": 3 - }, - "supportedCloudProviders": { - "rule": "repeated", - "type": "CloudProvider", - "id": 4 - }, - "frameworkCategories": { - "rule": "repeated", - "type": "FrameworkCategory", - "id": 5 - }, - "frameworkDisplayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "name": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "majorRevisionId": { - "type": "int64", - "id": 8 - }, - "minorRevisionId": { - "type": "int64", - "id": 9 - }, - "targetResourceDetails": { - "rule": "repeated", - "type": "TargetResourceDetails", - "id": 10 - }, - "findingCount": { - "type": "int64", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "controlsPassingTrend": { - "type": "Trend", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "FindingSummary": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FindingSummary", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}", - "(google.api.resource).plural": "findingSummaries", - "(google.api.resource).singular": "findingSummary" - }, - "fields": { - "findingCategory": { - "type": "string", - "id": 1 - }, - "findingClass": { - "type": "FindingClass", - "id": 2 - }, - "severity": { - "type": "Severity", - "id": 3 - }, - "findingCount": { - "type": "int64", - "id": 4 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "relatedFrameworks": { - "rule": "repeated", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "name": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - } - } - }, - "ControlComplianceSummary": { - "options": { - "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/ControlComplianceSummary", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}", - "(google.api.resource).plural": "controlComplianceSummaries", - "(google.api.resource).singular": "controlComplianceSummary" - }, - "fields": { - "control": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "overallEvaluationState": { - "type": "EvaluationState", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "totalFindingsCount": { - "type": "int32", - "id": 5 - }, - "complianceFrameworks": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "similarControls": { - "rule": "repeated", - "type": "SimilarControls", - "id": 7 - }, - "cloudControlReports": { - "rule": "repeated", - "type": "CloudControlReport", - "id": 8 - }, - "controlResponsibilityType": { - "type": "RegulatoryControlResponsibilityType", - "id": 9 - }, - "isFakeControl": { - "type": "bool", - "id": 10 - }, - "name": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - } - } - }, - "CloudControlReport": { - "oneofs": { - "assessmentDetails": { - "oneof": [ - "manualCloudControlAssessmentDetails", - "cloudControlAssessmentDetails" - ] - } - }, - "fields": { - "manualCloudControlAssessmentDetails": { - "type": "ManualCloudControlAssessmentDetails", - "id": 13 - }, - "cloudControlAssessmentDetails": { - "type": "CloudControlAssessmentDetails", - "id": 14 - }, - "cloudControl": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "categories": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "similarControls": { - "rule": "repeated", - "type": "SimilarControls", - "id": 9 - }, - "cloudControlType": { - "type": "CloudControl.Type", - "id": 10 - }, - "findingCategory": { - "type": "string", - "id": 11 - }, - "rules": { - "rule": "repeated", - "type": "Rule", - "id": 12 - }, - "findingSeverity": { - "type": "Severity", - "id": 15 - }, - "enforcementMode": { - "type": "EnforcementMode", - "id": 16 - }, - "cloudControlDeployment": { - "type": "string", - "id": 17 - }, - "majorRevisionId": { - "type": "int64", - "id": 18 - }, - "minorRevisionId": { - "type": "int64", - "id": 19 - }, - "frameworkMajorRevisionIds": { - "rule": "repeated", - "type": "int64", - "id": 20 - } - } - }, - "ManualCloudControlAssessmentDetails": { - "fields": { - "manualCloudControlGuide": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "CloudControlAssessmentDetails": { - "fields": { - "findingsCount": { - "type": "int32", - "id": 1 - }, - "evaluationState": { - "type": "EvaluationState", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "SimilarControls": { - "fields": { - "framework": { - "type": "string", - "id": 1 - }, - "controlId": { - "type": "string", - "id": 2 - } - } - }, - "AggregatedComplianceReport": { - "fields": { - "controlAssessmentDetails": { - "type": "ControlAssessmentDetails", - "id": 1 - }, - "reportTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } - }, - "TargetResourceDetails": { - "fields": { - "frameworkDeployment": { - "type": "string", - "id": 1 - }, - "targetResourceDisplayName": { - "type": "string", - "id": 2 - }, - "targetResource": { - "type": "string", - "id": 3 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "majorRevisionId": { - "type": "int64", - "id": 6 - }, - "minorRevisionId": { - "type": "int64", - "id": 7 - } - } - }, - "Trend": { - "fields": { - "duration": { - "type": "google.protobuf.Duration", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "valuePercent": { - "type": "double", - "id": 2, - "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": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "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 - } - } - }, - "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" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "edition": "proto2", - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "edition": "proto2", - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "edition": "proto2", - "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 - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11 - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "edition": "proto2", - "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": { - "edition": "proto2", - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "edition": "proto2", - "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_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "edition": "proto2", - "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": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "edition": "proto2", - "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": { - "edition": "proto2", - "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 - } - }, - "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 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "edition": "proto2", - "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 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "edition": "proto2", - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19 - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "edition": "proto2", - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "edition": "proto2", - "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 - } - } - } - } - }, - "FeatureSet": { - "edition": "proto2", - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "edition": "proto2", - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "edition": "proto2", - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2, - "options": { - "packed": true - } - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "edition": "proto2", - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "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": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "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" - }, - "parsedOptions": [ - { - "(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" - }, - "parsedOptions": [ - { - "(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" - }, - "parsedOptions": [ - { - "(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" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "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 - } - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/interval;interval", - "java_multiple_files": true, - "java_outer_classname": "IntervalProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Interval": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js deleted file mode 100644 index 9b44a014cfe..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.create_framework_audit.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, frameworkAudit) { - // [START cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource where this framework audit is created. - * Supported formats are the following: - * * `organizations/{organization_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `projects/{project_id}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The ID to use for the framework audit. The ID becomes the final - * component of the framework audit's full resource name. - * The ID must be between 4-63 characters, and valid characters - * are `\a-z 0-9 -\`. - */ - // const frameworkAuditId = 'abc123' - /** - * Required. The framework audit to create. - */ - // const frameworkAudit = {} - - // Imports the Cloudsecuritycompliance library - const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new AuditClient(); - - async function callCreateFrameworkAudit() { - // Construct request - const request = { - parent, - frameworkAudit, - }; - - // Run request - const [operation] = await cloudsecuritycomplianceClient.createFrameworkAudit(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateFrameworkAudit(); - // [END cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js deleted file mode 100644 index c0c248e3f4b..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.generate_framework_audit_scope_report.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(scope, reportFormat, complianceFramework) { - // [START cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The organization, folder or project for the audit report. - * Supported formats are the following: - * * `projects/{project_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `organizations/{organization_id}/locations/{location}` - */ - // const scope = 'abc123' - /** - * Required. The format that the scope report bytes is returned in. - */ - // const reportFormat = {} - /** - * Required. The compliance framework that the scope report is generated for. - */ - // const complianceFramework = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new AuditClient(); - - async function callGenerateFrameworkAuditScopeReport() { - // Construct request - const request = { - scope, - reportFormat, - complianceFramework, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.generateFrameworkAuditScopeReport(request); - console.log(response); - } - - callGenerateFrameworkAuditScopeReport(); - // [END cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js deleted file mode 100644 index b5488212195..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.get_framework_audit.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the framework audit to retrieve. - * Supported formats are the following: - * * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - * * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - * * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - */ - // const name = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new AuditClient(); - - async function callGetFrameworkAudit() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.getFrameworkAudit(request); - console.log(response); - } - - callGetFrameworkAudit(); - // [END cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js deleted file mode 100644 index 99083965240..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/audit.list_framework_audits.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource where the framework audits are listed. - * Supported formats are the following: - * * `organizations/{organization_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `projects/{project_id}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of framework audits to return. The service - * might return fewer audits than this value. If unspecified, a maximum of 10 - * framework audits are returned. The maximum value is 50; values above 50 are - * limited to 50. - */ - // const pageSize = 1234 - /** - * Optional. The `next_page_token` value that's returned from a previous list - * request, if any. - */ - // const pageToken = 'abc123' - /** - * Optional. The filters to apply to the framework audits. - * Supported filters are `compliance_framework`, `compliance_state`, - * `create_time,` and `framework_audit_name`. If the filter is invalid, an - * invalid argument error is returned. - * For syntax details, see AIP-160 https://google.aip.dev/160. - */ - // const filter = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {AuditClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new AuditClient(); - - async function callListFrameworkAudits() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listFrameworkAuditsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFrameworkAudits(); - // [END cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js deleted file mode 100644 index 730a95098ce..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Compliance Manager enrollment to calculate. - * Supported formats are the following: - * * `organizations/{organization_id}/locations/{location}/cmEnrollment` - * * `folders/{folder_id}/locations/{location}/cmEnrollment` - * * `projects/{project_id}/locations/{location}/cmEnrollment` - */ - // const name = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {CmEnrollmentServiceClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new CmEnrollmentServiceClient(); - - async function callCalculateEffectiveCmEnrollment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.calculateEffectiveCmEnrollment(request); - console.log(response); - } - - callCalculateEffectiveCmEnrollment(); - // [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js deleted file mode 100644 index a058af97787..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(cmEnrollment) { - // [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The Compliance Manager enrollment to update. - * The `name` field is used to identify the settings that you want to update. - */ - // const cmEnrollment = {} - /** - * Optional. The list of fields that you want to update. - */ - // const updateMask = {} - - // Imports the Cloudsecuritycompliance library - const {CmEnrollmentServiceClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new CmEnrollmentServiceClient(); - - async function callUpdateCmEnrollment() { - // Construct request - const request = { - cmEnrollment, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.updateCmEnrollment(request); - console.log(response); - } - - callUpdateCmEnrollment(); - // [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js deleted file mode 100644 index ba921be782e..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, cloudControlId, cloudControl) { - // [START cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}`. - * - `projects/{project}/locations/{location}`. - * The only supported location is `global`. - */ - // const parent = 'abc123' - /** - * Required. The identifier for the cloud control, which is the last segment - * of the cloud control name. The format is - * `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. - */ - // const cloudControlId = 'abc123' - /** - * Required. The cloud control that's being created. - */ - // const cloudControl = {} - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callCreateCloudControl() { - // Construct request - const request = { - parent, - cloudControlId, - cloudControl, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.createCloudControl(request); - console.log(response); - } - - callCreateCloudControl(); - // [END cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js deleted file mode 100644 index 01b7f00be2c..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, frameworkId, framework) { - // [START cloudsecuritycompliance_v1_generated_Config_CreateFramework_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * The only supported location is `global`. - */ - // const parent = 'abc123' - /** - * Required. The identifier (ID) of the framework. The ID is not the full name - * of the framework; it's the last part of the full name of the framework. - */ - // const frameworkId = 'abc123' - /** - * Required. The resource being created. - */ - // const framework = {} - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callCreateFramework() { - // Construct request - const request = { - parent, - frameworkId, - framework, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.createFramework(request); - console.log(response); - } - - callCreateFramework(); - // [END cloudsecuritycompliance_v1_generated_Config_CreateFramework_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js deleted file mode 100644 index 341e9f4f6a7..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the cloud control to delete, in one of the following - * formats: - * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` - * or - * `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. - * The only supported location is `global`. - */ - // const name = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callDeleteCloudControl() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.deleteCloudControl(request); - console.log(response); - } - - callDeleteCloudControl(); - // [END cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js deleted file mode 100644 index 103c52a4a93..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the resource, in one of the following formats: - * `organizations/{organization}/locations/{location}/frameworks/{framework}` - * or - * `projects/{project}/locations/{location}/frameworks/{framework}`. - * The only supported location is `global`. - */ - // const name = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callDeleteFramework() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.deleteFramework(request); - console.log(response); - } - - callDeleteFramework(); - // [END cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js deleted file mode 100644 index cb9b86d8382..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the cloud control to retrieve, in one of the - * following formats: - * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - * or - * `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - * The only supported location is `global`. - */ - // const name = 'abc123' - /** - * Optional. The major version of the cloud control to retrieve. If not - * specified, the most recently updated `revision_id` is retrieved. - */ - // const majorRevisionId = 1234 - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callGetCloudControl() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.getCloudControl(request); - console.log(response); - } - - callGetCloudControl(); - // [END cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js deleted file mode 100644 index 3c883cf3035..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Config_GetFramework_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the framework to retrieve, in one of the following - * formats: - * `organizations/{organization}/locations/{location}/frameworks/{framework}` - * or - * `projects/{project}/locations/{location}/frameworks/{framework}`. - * The only supported location is `global`. - */ - // const name = 'abc123' - /** - * Optional. The framework major version to retrieve. If not specified, the - * most recently updated `revision_id` is retrieved. - */ - // const majorRevisionId = 1234 - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callGetFramework() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.getFramework(request); - console.log(response); - } - - callGetFramework(); - // [END cloudsecuritycompliance_v1_generated_Config_GetFramework_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js deleted file mode 100644 index b6888455f71..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * The only supported location is `global`. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of cloud controls to return. The default value - * is `500`. - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token that's returned from a previous request to - * list cloud controls. Provide this token to retrieve the next page of - * results. - * When paginating, the parent that you provide to the - * ListCloudControls google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls - * request must match the call that provided the page token. - */ - // const pageToken = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callListCloudControls() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listCloudControlsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListCloudControls(); - // [END cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js deleted file mode 100644 index f37c2a647dc..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * The only supported location is `global`. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of frameworks to return. The default value is - * `500`. - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request to list - * frameworks. Provide this token to retrieve the next page of results. - */ - // const pageToken = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callListFrameworks() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listFrameworksAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFrameworks(); - // [END cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js deleted file mode 100644 index 54ced20aeb2..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_cloud_control.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(cloudControl) { - // [START cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_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. - */ - /** - * Optional. Use a field mask to specify the fields to be overwritten in the - * cloud control during the update. - * The fields that you specify in the `update_mask` are relative to the - * cloud control, not the full request. A field is overwritten if it is in - * the mask. If you don't provide a mask, all fields in the request - * are updated. - * You can update the following fields: - * - Display name - * - Description - * - Parameters - * - Rules - * - Parameter specification - */ - // const updateMask = {} - /** - * Required. The cloud control that you're updating. - */ - // const cloudControl = {} - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callUpdateCloudControl() { - // Construct request - const request = { - cloudControl, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.updateCloudControl(request); - console.log(response); - } - - callUpdateCloudControl(); - // [END cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js deleted file mode 100644 index 3f6ba9747da..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.update_framework.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(framework) { - // [START cloudsecuritycompliance_v1_generated_Config_UpdateFramework_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. - */ - /** - * Optional. A field mask is used to specify the fields to be overwritten in - * the framework resource by the update. The fields specified in the - * `update_mask` are relative to the resource, not the full request. A field - * is overwritten if it is in the mask. If you don't provide a mask then all - * fields present in the request will be overwritten. - */ - // const updateMask = {} - /** - * Required. The resource that is being updated. - */ - // const framework = {} - /** - * Optional. The major version ID of the framework to update. - */ - // const majorRevisionId = 1234 - - // Imports the Cloudsecuritycompliance library - const {ConfigClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new ConfigClient(); - - async function callUpdateFramework() { - // Construct request - const request = { - framework, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.updateFramework(request); - console.log(response); - } - - callUpdateFramework(); - // [END cloudsecuritycompliance_v1_generated_Config_UpdateFramework_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js deleted file mode 100644 index 6d1895cfa54..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, frameworkDeployment) { - // [START cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the framework deployment in the format - * `organizations/{organization}/locations/{location}` - * or - * `projects/{project}/locations/{location}`. - * Only the global location is supported. - */ - // const parent = 'abc123' - /** - * Optional. An identifier for the framework deployment that's unique in scope - * of the parent. If you don't specify a value, then a random UUID is - * generated. - */ - // const frameworkDeploymentId = 'abc123' - /** - * Required. The framework deployment that you're creating. - */ - // const frameworkDeployment = {} - - // Imports the Cloudsecuritycompliance library - const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new DeploymentClient(); - - async function callCreateFrameworkDeployment() { - // Construct request - const request = { - parent, - frameworkDeployment, - }; - - // Run request - const [operation] = await cloudsecuritycomplianceClient.createFrameworkDeployment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateFrameworkDeployment(); - // [END cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js deleted file mode 100644 index 061be6c79d5..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the framework deployment that you want to delete, - * in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - * or - * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - * The only supported location is `global`. - */ - // const name = 'abc123' - /** - * Optional. An opaque identifier for the current version of the resource. - * If you provide this value, then it must match the existing value. If the - * values don't match, then the request fails with an - * `ABORTED` google.rpc.Code.ABORTED error. - * If you omit this value, then the resource is deleted regardless of its - * current `etag` value. - */ - // const etag = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new DeploymentClient(); - - async function callDeleteFrameworkDeployment() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await cloudsecuritycomplianceClient.deleteFrameworkDeployment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteFrameworkDeployment(); - // [END cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js deleted file mode 100644 index 5700b2100de..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name for the cloud control deployment, in the format - * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - * or - * `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - * The only supported location is `global`. - */ - // const name = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new DeploymentClient(); - - async function callGetCloudControlDeployment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.getCloudControlDeployment(request); - console.log(response); - } - - callGetCloudControlDeployment(); - // [END cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js deleted file mode 100644 index 8bd828cc6a7..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the framework deployment, in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - * or - * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - * The only supported location is `global`. - */ - // const name = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new DeploymentClient(); - - async function callGetFrameworkDeployment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.getFrameworkDeployment(request); - console.log(response); - } - - callGetFrameworkDeployment(); - // [END cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js deleted file mode 100644 index 3b79a1db407..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}` or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - */ - // const parent = 'abc123' - /** - * Optional. The requested page size. The server might return fewer items than - * you requested. - * If unspecified, the server picks an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token that identifies the page of results that the server - * should return. - */ - // const pageToken = 'abc123' - /** - * Optional. The filter to apply on the resource, as defined by - * AIP-160: Filtering (https://google.aip.dev/160). - */ - // const filter = 'abc123' - /** - * Optional. The sort order for the results. The following values are - * supported: - * * `name` - * * `name desc` - * If you do not specify a value, then the results are not sorted. - */ - // const orderBy = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new DeploymentClient(); - - async function callListCloudControlDeployments() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listCloudControlDeploymentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListCloudControlDeployments(); - // [END cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js deleted file mode 100644 index df8505aaffd..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}` - * or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - */ - // const parent = 'abc123' - /** - * Optional. The requested page size. The server might return fewer items than - * requested. - * If unspecified, the server picks an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token that identifies a page of results the server should - * return. - */ - // const pageToken = 'abc123' - /** - * Optional. The filter to be applied on the resource, as defined by - * AIP-160: Filtering (https://google.aip.dev/160). - */ - // const filter = 'abc123' - /** - * Optional. The sort order for the results. The following values are - * supported: - * * `name` - * * `name desc` - * If you do not specify a value, then the results are not sorted. - */ - // const orderBy = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {DeploymentClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new DeploymentClient(); - - async function callListFrameworkDeployments() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listFrameworkDeploymentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFrameworkDeployments(); - // [END cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js deleted file mode 100644 index 001c9f5ce53..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.aggregate_framework_compliance_report.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the aggregated compliance report over time to - * retrieve. - * The supported format is: - * `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - */ - // const name = 'abc123' - /** - * Optional. The start and end time range for the aggregated compliance - * report. - */ - // const interval = {} - /** - * Optional. The filtering results. - */ - // const filter = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new MonitoringClient(); - - async function callAggregateFrameworkComplianceReport() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.aggregateFrameworkComplianceReport(request); - console.log(response); - } - - callAggregateFrameworkComplianceReport(); - // [END cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js deleted file mode 100644 index 15537e784c6..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the framework compliance report to retrieve. - */ - // const name = 'abc123' - /** - * Optional. The end time of the report. - */ - // const endTime = {} - /** - * Optional. The filtering results. - */ - // const filter = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new MonitoringClient(); - - async function callFetchFrameworkComplianceReport() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await cloudsecuritycomplianceClient.fetchFrameworkComplianceReport(request); - console.log(response); - } - - callFetchFrameworkComplianceReport(); - // [END cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js deleted file mode 100644 index 3c292d197ad..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_control_compliance_summaries.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent scope for the framework overview page. - */ - // const parent = 'abc123' - /** - * Optional. The end time of the control compliance summary. - */ - // const endTime = {} - /** - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token that identifies the page of results that the server - * should return. - */ - // const pageToken = 'abc123' - /** - * Optional. The filtering results. - */ - // const filter = 'abc123' - - // Imports the Cloudsecuritycompliance library - const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new MonitoringClient(); - - async function callListControlComplianceSummaries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listControlComplianceSummariesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListControlComplianceSummaries(); - // [END cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js deleted file mode 100644 index 0dd2bfce2e5..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_finding_summaries.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent scope for the framework overview page. - */ - // const parent = 'abc123' - /** - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token that identifies the page of results that the server - * should return. - */ - // const pageToken = 'abc123' - /** - * Optional. The filtering results. - */ - // const filter = 'abc123' - /** - * Optional. The end time of the finding summary. - */ - // const endTime = {} - - // Imports the Cloudsecuritycompliance library - const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new MonitoringClient(); - - async function callListFindingSummaries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listFindingSummariesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFindingSummaries(); - // [END cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js deleted file mode 100644 index b93c05a9230..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent scope for the framework compliance summary. - */ - // const parent = 'abc123' - /** - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token that identifies the page of results that the server - * should return. - */ - // const pageToken = 'abc123' - /** - * Optional. The filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Specifies the level of detail to return in the response. - */ - // const view = {} - - // Imports the Cloudsecuritycompliance library - const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; - - // Instantiates a client - const cloudsecuritycomplianceClient = new MonitoringClient(); - - async function callListFrameworkComplianceSummaries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = cloudsecuritycomplianceClient.listFrameworkComplianceSummariesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListFrameworkComplianceSummaries(); - // [END cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json deleted file mode 100644 index c60712c3a15..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json +++ /dev/null @@ -1,1287 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-cloudsecuritycompliance", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.cloudsecuritycompliance.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async", - "title": "Audit generateFrameworkAuditScopeReport Sample", - "origin": "API_DEFINITION", - "description": " Generates an audit scope report for a framework.", - "canonical": true, - "file": "audit.generate_framework_audit_scope_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateFrameworkAuditScopeReport", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReport", - "async": true, - "parameters": [ - { - "name": "scope", - "type": "TYPE_STRING" - }, - { - "name": "report_format", - "type": ".google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format" - }, - { - "name": "compliance_framework", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse", - "client": { - "shortName": "AuditClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" - }, - "method": { - "shortName": "GenerateFrameworkAuditScopeReport", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReport", - "service": { - "shortName": "Audit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async", - "title": "Audit createFrameworkAudit Sample", - "origin": "API_DEFINITION", - "description": " Creates an audit scope report for a framework.", - "canonical": true, - "file": "audit.create_framework_audit.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateFrameworkAudit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAudit", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "framework_audit_id", - "type": "TYPE_STRING" - }, - { - "name": "framework_audit", - "type": ".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AuditClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" - }, - "method": { - "shortName": "CreateFrameworkAudit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAudit", - "service": { - "shortName": "Audit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async", - "title": "Audit listFrameworkAudits Sample", - "origin": "API_DEFINITION", - "description": " Lists the framework audits for a given organization, folder, or project.", - "canonical": true, - "file": "audit.list_framework_audits.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFrameworkAudits", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAudits", - "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" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse", - "client": { - "shortName": "AuditClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" - }, - "method": { - "shortName": "ListFrameworkAudits", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAudits", - "service": { - "shortName": "Audit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async", - "title": "Audit getFrameworkAudit Sample", - "origin": "API_DEFINITION", - "description": " Gets the details for a framework audit.", - "canonical": true, - "file": "audit.get_framework_audit.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFrameworkAudit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAudit", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.FrameworkAudit", - "client": { - "shortName": "AuditClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.AuditClient" - }, - "method": { - "shortName": "GetFrameworkAudit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAudit", - "service": { - "shortName": "Audit", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async", - "title": "Audit updateCmEnrollment Sample", - "origin": "API_DEFINITION", - "description": " Updates the Compliance Manager enrollment for a resource to facilitate an audit. Use this method to enroll a resource in Compliance Manager or to create or update feature-specific configurations.", - "canonical": true, - "file": "cm_enrollment_service.update_cm_enrollment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCmEnrollment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollment", - "async": true, - "parameters": [ - { - "name": "cm_enrollment", - "type": ".google.cloud.cloudsecuritycompliance.v1.CmEnrollment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.CmEnrollment", - "client": { - "shortName": "CmEnrollmentServiceClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentServiceClient" - }, - "method": { - "shortName": "UpdateCmEnrollment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollment", - "service": { - "shortName": "CmEnrollmentService", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async", - "title": "Audit calculateEffectiveCmEnrollment Sample", - "origin": "API_DEFINITION", - "description": " Calculates the effective Compliance Manager enrollment for a resource. An effective enrollment is either a direct enrollment of a resource (if it exists), or an enrollment of the closest parent of a resource that's enrolled in Compliance Manager.", - "canonical": true, - "file": "cm_enrollment_service.calculate_effective_cm_enrollment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CalculateEffectiveCmEnrollment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse", - "client": { - "shortName": "CmEnrollmentServiceClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentServiceClient" - }, - "method": { - "shortName": "CalculateEffectiveCmEnrollment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollment", - "service": { - "shortName": "CmEnrollmentService", - "fullName": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async", - "title": "Audit listFrameworks Sample", - "origin": "API_DEFINITION", - "description": " Lists the frameworks (both built-in and custom) that are available within the parent resource. The latest major version of each framework is returned. This method supports pagination.", - "canonical": true, - "file": "config.list_frameworks.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFrameworks", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "ListFrameworks", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworks", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_GetFramework_async", - "title": "Audit getFramework Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a framework. This method retrieves the latest major version of the framework. To retrieve a specific major version, include `major_revision_id` in the request.", - "canonical": true, - "file": "config.get_framework.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetFramework", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "major_revision_id", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.Framework", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "GetFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetFramework", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_CreateFramework_async", - "title": "Audit createFramework Sample", - "origin": "API_DEFINITION", - "description": " Creates a custom framework in a given parent resource. You can't create built-in frameworks because those are managed by Google.", - "canonical": true, - "file": "config.create_framework.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateFramework", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "framework_id", - "type": "TYPE_STRING" - }, - { - "name": "framework", - "type": ".google.cloud.cloudsecuritycompliance.v1.Framework" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.Framework", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "CreateFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateFramework", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_UpdateFramework_async", - "title": "Audit updateFramework Sample", - "origin": "API_DEFINITION", - "description": " Updates a custom framework. This method allows for partial updates of a framework. Use the `update_mask` to specify which fields to update. Consider the following: - If you provide an `update_mask`, only the fields that are specified in the mask are updated. - If you don't provide an `update_mask`, all the fields that are present in the request's `framework` body are used to overwrite the existing resource. You can only update frameworks with the `CUSTOM` type. A successful update creates a new version of the framework.", - "canonical": true, - "file": "config.update_framework.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateFramework", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "framework", - "type": ".google.cloud.cloudsecuritycompliance.v1.Framework" - }, - { - "name": "major_revision_id", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.Framework", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "UpdateFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateFramework", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async", - "title": "Audit deleteFramework Sample", - "origin": "API_DEFINITION", - "description": " Deletes a custom framework, including all its major and minor revisions. Consider the following: - You can't delete built-in frameworks. You can only delete frameworks with type `CUSTOM`. - You can't delete frameworks that are deployed to a resource. - You can't restore a deleted framework. This action is permanent.", - "canonical": true, - "file": "config.delete_framework.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteFramework", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "DeleteFramework", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteFramework", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async", - "title": "Audit listCloudControls Sample", - "origin": "API_DEFINITION", - "description": " Lists the cloud controls (both built-in and custom) that are available in a given parent resource. The latest major version of each cloud control is returned. This method supports pagination.", - "canonical": true, - "file": "config.list_cloud_controls.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCloudControls", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "ListCloudControls", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async", - "title": "Audit getCloudControl Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a cloud control. This method retrieves the latest major version of a cloud control that you identify by name. By default, the latest major version of the cloud control is returned. To retrieve a specific major version, include `major_revision_id` in the request.", - "canonical": true, - "file": "config.get_cloud_control.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControl", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "major_revision_id", - "type": "TYPE_INT64" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControl", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "GetCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControl", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async", - "title": "Audit createCloudControl Sample", - "origin": "API_DEFINITION", - "description": " Creates a custom cloud control in a given parent resource. You can't create built-in cloud controls because those are managed by Google.", - "canonical": true, - "file": "config.create_cloud_control.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControl", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "cloud_control_id", - "type": "TYPE_STRING" - }, - { - "name": "cloud_control", - "type": ".google.cloud.cloudsecuritycompliance.v1.CloudControl" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControl", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "CreateCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControl", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_async", - "title": "Audit updateCloudControl Sample", - "origin": "API_DEFINITION", - "description": " Updates a custom cloud control. This method allows for partial updates of a cloud control. Use the `update_mask` to specify which fields to update. Consider the following: - If you provide an `update_mask`, only the fields that are specified in the mask are updated. - If you don't provide an `update_mask`, all the fields that are present in the request's `cloud_control` body are used to overwrite the existing resource. You can only update cloud controls with the `CUSTOM` type. A successful update creates a new version of the cloud control.", - "canonical": true, - "file": "config.update_cloud_control.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControl", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "cloud_control", - "type": ".google.cloud.cloudsecuritycompliance.v1.CloudControl" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControl", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "UpdateCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControl", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async", - "title": "Audit deleteCloudControl Sample", - "origin": "API_DEFINITION", - "description": " Deletes a custom cloud control, including all its major and minor revisions. Consider the following: - You can't delete built-in cloud controls. You can only delete cloud controls with type `CUSTOM`. - You can't delete cloud controls if any of the versions are referenced by a framework. - You can't restore a deleted cloud control. This action is permanent.", - "canonical": true, - "file": "config.delete_cloud_control.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControl", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ConfigClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.ConfigClient" - }, - "method": { - "shortName": "DeleteCloudControl", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControl", - "service": { - "shortName": "Config", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async", - "title": "Audit createFrameworkDeployment Sample", - "origin": "API_DEFINITION", - "description": " Creates a framework deployment in a given parent resource. A framework deployment lets you assign a particular framework version to an organization, folder, or project so that you can control and monitor those resources using the framework's cloud controls.", - "canonical": true, - "file": "deployment.create_framework_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateFrameworkDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeployment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "framework_deployment_id", - "type": "TYPE_STRING" - }, - { - "name": "framework_deployment", - "type": ".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DeploymentClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" - }, - "method": { - "shortName": "CreateFrameworkDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeployment", - "service": { - "shortName": "Deployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async", - "title": "Audit deleteFrameworkDeployment Sample", - "origin": "API_DEFINITION", - "description": " Deletes a framework deployment.", - "canonical": true, - "file": "deployment.delete_framework_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteFrameworkDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DeploymentClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" - }, - "method": { - "shortName": "DeleteFrameworkDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeployment", - "service": { - "shortName": "Deployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async", - "title": "Audit getFrameworkDeployment Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a framework deployment.", - "canonical": true, - "file": "deployment.get_framework_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetFrameworkDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment", - "client": { - "shortName": "DeploymentClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" - }, - "method": { - "shortName": "GetFrameworkDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeployment", - "service": { - "shortName": "Deployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async", - "title": "Audit listFrameworkDeployments Sample", - "origin": "API_DEFINITION", - "description": " Lists the framework deployments in a given parent resource.", - "canonical": true, - "file": "deployment.list_framework_deployments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFrameworkDeployments", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeployments", - "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.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse", - "client": { - "shortName": "DeploymentClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" - }, - "method": { - "shortName": "ListFrameworkDeployments", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeployments", - "service": { - "shortName": "Deployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async", - "title": "Audit getCloudControlDeployment Sample", - "origin": "API_DEFINITION", - "description": " Gets details about a cloud control deployment.", - "canonical": true, - "file": "deployment.get_cloud_control_deployment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCloudControlDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeployment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment", - "client": { - "shortName": "DeploymentClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" - }, - "method": { - "shortName": "GetCloudControlDeployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeployment", - "service": { - "shortName": "Deployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async", - "title": "Audit listCloudControlDeployments Sample", - "origin": "API_DEFINITION", - "description": " Lists the cloud conrol deployments in a given parent resource.", - "canonical": true, - "file": "deployment.list_cloud_control_deployments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCloudControlDeployments", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeployments", - "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.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse", - "client": { - "shortName": "DeploymentClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.DeploymentClient" - }, - "method": { - "shortName": "ListCloudControlDeployments", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeployments", - "service": { - "shortName": "Deployment", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async", - "title": "Audit listFrameworkComplianceSummaries Sample", - "origin": "API_DEFINITION", - "description": " Lists the framework compliance summary for a given scope.", - "canonical": true, - "file": "monitoring.list_framework_compliance_summaries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFrameworkComplianceSummaries", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummaries", - "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": "view", - "type": ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse", - "client": { - "shortName": "MonitoringClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" - }, - "method": { - "shortName": "ListFrameworkComplianceSummaries", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummaries", - "service": { - "shortName": "Monitoring", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async", - "title": "Audit listFindingSummaries Sample", - "origin": "API_DEFINITION", - "description": " Lists the finding summary by category for a given scope.", - "canonical": true, - "file": "monitoring.list_finding_summaries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListFindingSummaries", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummaries", - "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": "end_time", - "type": ".google.protobuf.Timestamp" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse", - "client": { - "shortName": "MonitoringClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" - }, - "method": { - "shortName": "ListFindingSummaries", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummaries", - "service": { - "shortName": "Monitoring", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async", - "title": "Audit fetchFrameworkComplianceReport Sample", - "origin": "API_DEFINITION", - "description": " Fetches the framework compliance report for a given scope.", - "canonical": true, - "file": "monitoring.fetch_framework_compliance_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchFrameworkComplianceReport", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport", - "client": { - "shortName": "MonitoringClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" - }, - "method": { - "shortName": "FetchFrameworkComplianceReport", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReport", - "service": { - "shortName": "Monitoring", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async", - "title": "Audit listControlComplianceSummaries Sample", - "origin": "API_DEFINITION", - "description": " Lists the control compliance summary for a given scope.", - "canonical": true, - "file": "monitoring.list_control_compliance_summaries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListControlComplianceSummaries", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummaries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse", - "client": { - "shortName": "MonitoringClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" - }, - "method": { - "shortName": "ListControlComplianceSummaries", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummaries", - "service": { - "shortName": "Monitoring", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - } - }, - { - "regionTag": "cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async", - "title": "Audit aggregateFrameworkComplianceReport Sample", - "origin": "API_DEFINITION", - "description": " Gets the aggregated compliance report over time for a given scope.", - "canonical": true, - "file": "monitoring.aggregate_framework_compliance_report.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AggregateFrameworkComplianceReport", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReport", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "interval", - "type": ".google.type.Interval" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse", - "client": { - "shortName": "MonitoringClient", - "fullName": "google.cloud.cloudsecuritycompliance.v1.MonitoringClient" - }, - "method": { - "shortName": "AggregateFrameworkComplianceReport", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReport", - "service": { - "shortName": "Monitoring", - "fullName": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts deleted file mode 100644 index 196e4086ea6..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by synthtool. ** -// ** https://github.com/googleapis/synthtool ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; - -const AuditClient = v1.AuditClient; -type AuditClient = v1.AuditClient; -const CmEnrollmentServiceClient = v1.CmEnrollmentServiceClient; -type CmEnrollmentServiceClient = v1.CmEnrollmentServiceClient; -const ConfigClient = v1.ConfigClient; -type ConfigClient = v1.ConfigClient; -const DeploymentClient = v1.DeploymentClient; -type DeploymentClient = v1.DeploymentClient; -const MonitoringClient = v1.MonitoringClient; -type MonitoringClient = v1.MonitoringClient; - -export {v1, AuditClient, CmEnrollmentServiceClient, ConfigClient, DeploymentClient, MonitoringClient}; -export default {v1, AuditClient, CmEnrollmentServiceClient, ConfigClient, DeploymentClient, MonitoringClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts deleted file mode 100644 index ef8d67c8ff4..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts +++ /dev/null @@ -1,2798 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1/audit_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './audit_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Service describing handlers for resources - * @class - * @memberof v1 - */ -export class AuditClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('cloudsecuritycompliance'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - auditStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of AuditClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. - * 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 AuditClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof AuditClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' - ), - folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cmEnrollment' - ), - organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/controls/{control}' - ), - organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' - ), - organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' - ), - organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' - ), - projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cmEnrollment' - ), - projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/controls/{control}' - ), - projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' - ), - projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' - ), - projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworks/{framework}' - ), - }; - - // 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 = { - listFrameworkAudits: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworkAudits') - }; - - const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}',}], - },{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',additional_bindings: [{get: '/v1/{name=projects/*}/locations',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=projects/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}/operations',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createFrameworkAuditResponse = protoFilesRoot.lookup( - '.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit') as gax.protobuf.Type; - const createFrameworkAuditMetadata = protoFilesRoot.lookup( - '.google.cloud.cloudsecuritycompliance.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createFrameworkAudit: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createFrameworkAuditResponse.decode.bind(createFrameworkAuditResponse), - createFrameworkAuditMetadata.decode.bind(createFrameworkAuditMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.cloudsecuritycompliance.v1.Audit', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.auditStub) { - return this.auditStub; - } - - // Put together the "service stub" for - // google.cloud.cloudsecuritycompliance.v1.Audit. - this.auditStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Audit') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Audit, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const auditStubMethods = - ['generateFrameworkAuditScopeReport', 'createFrameworkAudit', 'listFrameworkAudits', 'getFrameworkAudit']; - for (const methodName of auditStubMethods) { - const callPromise = this.auditStub.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._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.auditStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * 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 -- - // ------------------- -/** - * Generates an audit scope report for a framework. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.scope - * Required. The organization, folder or project for the audit report. - * - * Supported formats are the following: - * - * * `projects/{project_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `organizations/{organization_id}/locations/{location}` - * @param {google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format} request.reportFormat - * Required. The format that the scope report bytes is returned in. - * @param {string} request.complianceFramework - * Required. The compliance framework that the scope report is generated for. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse|GenerateFrameworkAuditScopeReportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/audit.generate_framework_audit_scope_report.js - * region_tag:cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_async - */ - generateFrameworkAuditScopeReport( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|undefined, {}|undefined - ]>; - generateFrameworkAuditScopeReport( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, - {}|null|undefined>): void; - generateFrameworkAuditScopeReport( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, - {}|null|undefined>): void; - generateFrameworkAuditScopeReport( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'scope': request.scope ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('generateFrameworkAuditScopeReport request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('generateFrameworkAuditScopeReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.generateFrameworkAuditScopeReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('generateFrameworkAuditScopeReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets the details for a framework audit. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the framework audit to retrieve. - * - * Supported formats are the following: - * - * * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - * * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - * * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/audit.get_framework_audit.js - * region_tag:cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_async - */ - getFrameworkAudit( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|undefined, {}|undefined - ]>; - getFrameworkAudit( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, - {}|null|undefined>): void; - getFrameworkAudit( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, - {}|null|undefined>): void; - getFrameworkAudit( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getFrameworkAudit request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getFrameworkAudit response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getFrameworkAudit(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkAuditRequest|undefined, - {}|undefined - ]) => { - this._log.info('getFrameworkAudit response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * Creates an audit scope report for a framework. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where this framework audit is created. - * - * Supported formats are the following: - * - * * `organizations/{organization_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `projects/{project_id}/locations/{location}` - * @param {string} [request.frameworkAuditId] - * Optional. The ID to use for the framework audit. The ID becomes the final - * component of the framework audit's full resource name. - * - * The ID must be between 4-63 characters, and valid characters - * are `\{@link protos.0-9|a-z}-\`. - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkAudit} request.frameworkAudit - * Required. The framework audit to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/audit.create_framework_audit.js - * region_tag:cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async - */ - createFrameworkAudit( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createFrameworkAudit( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createFrameworkAudit( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createFrameworkAudit( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkAuditRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createFrameworkAudit response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createFrameworkAudit request %j', request); - return this.innerApiCalls.createFrameworkAudit(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createFrameworkAudit response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createFrameworkAudit()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/audit.create_framework_audit.js - * region_tag:cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_async - */ - async checkCreateFrameworkAuditProgress(name: string): Promise>{ - this._log.info('createFrameworkAudit long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createFrameworkAudit, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists the framework audits for a given organization, folder, or project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where the framework audits are listed. - * - * Supported formats are the following: - * - * * `organizations/{organization_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `projects/{project_id}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of framework audits to return. The service - * might return fewer audits than this value. If unspecified, a maximum of 10 - * framework audits are returned. The maximum value is 50; values above 50 are - * limited to 50. - * @param {string} [request.pageToken] - * Optional. The `next_page_token` value that's returned from a previous list - * request, if any. - * @param {string} [request.filter] - * Optional. The filters to apply to the framework audits. - * Supported filters are `compliance_framework`, `compliance_state`, - * `create_time,` and `framework_audit_name`. If the filter is invalid, an - * invalid argument error is returned. - * For syntax details, see {@link protos.https://google.aip.dev/160|AIP-160}. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit}. - * 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 `listFrameworkAuditsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworkAudits( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse - ]>; - listFrameworkAudits( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>): void; - listFrameworkAudits( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>): void; - listFrameworkAudits( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFrameworkAudits values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listFrameworkAudits request %j', request); - return this.innerApiCalls - .listFrameworkAudits(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsResponse - ]) => { - this._log.info('listFrameworkAudits values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listFrameworkAudits`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where the framework audits are listed. - * - * Supported formats are the following: - * - * * `organizations/{organization_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `projects/{project_id}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of framework audits to return. The service - * might return fewer audits than this value. If unspecified, a maximum of 10 - * framework audits are returned. The maximum value is 50; values above 50 are - * limited to 50. - * @param {string} [request.pageToken] - * Optional. The `next_page_token` value that's returned from a previous list - * request, if any. - * @param {string} [request.filter] - * Optional. The filters to apply to the framework audits. - * Supported filters are `compliance_framework`, `compliance_state`, - * `create_time,` and `framework_audit_name`. If the filter is invalid, an - * invalid argument error is returned. - * For syntax details, see {@link protos.https://google.aip.dev/160|AIP-160}. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit} 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 `listFrameworkAuditsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworkAuditsStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworkAudits']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworkAudits stream %j', request); - return this.descriptors.page.listFrameworkAudits.createStream( - this.innerApiCalls.listFrameworkAudits as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFrameworkAudits`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where the framework audits are listed. - * - * Supported formats are the following: - * - * * `organizations/{organization_id}/locations/{location}` - * * `folders/{folder_id}/locations/{location}` - * * `projects/{project_id}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of framework audits to return. The service - * might return fewer audits than this value. If unspecified, a maximum of 10 - * framework audits are returned. The maximum value is 50; values above 50 are - * limited to 50. - * @param {string} [request.pageToken] - * Optional. The `next_page_token` value that's returned from a previous list - * request, if any. - * @param {string} [request.filter] - * Optional. The filters to apply to the framework audits. - * Supported filters are `compliance_framework`, `compliance_state`, - * `create_time,` and `framework_audit_name`. If the filter is invalid, an - * invalid argument error is returned. - * For syntax details, see {@link protos.https://google.aip.dev/160|AIP-160}. - * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit|FrameworkAudit}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/audit.list_framework_audits.js - * region_tag:cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_async - */ - listFrameworkAuditsAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkAuditsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworkAudits']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworkAudits iterate %j', request); - return this.descriptors.page.listFrameworkAudits.asyncIterate( - this.innerApiCalls['listFrameworkAudits'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * 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 - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. 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.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified folderLocationFindingSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ - folder: folder, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the folder from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * 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 organizationLocationCloudControlDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified organizationLocationCloudControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified organizationLocationCmEnrollment resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationCmEnrollmentPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; - } - - /** - * Parse the location from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified organizationLocationControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - organizationLocationControlsPath(organization:string,location:string,control:string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.render({ - organization: organization, - location: location, - control: control, - }); - } - - /** - * Parse the organization from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; - } - - /** - * Parse the control from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; - } - - /** - * Return a fully-qualified organizationLocationFindingSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ - organization: organization, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ - organization: organization, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAudits resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ - organization: organization, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ - organization: organization, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified organizationLocationFrameworks resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - organizationLocationFrameworksPath(organization:string,location:string,framework:string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ - organization: organization, - location: location, - framework: framework, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; - } - - /** - * Parse the framework from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified projectLocationCloudControlDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ - project: project, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the project from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified projectLocationCloudControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ - project: project, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the project from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified projectLocationCmEnrollment resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - projectLocationCmEnrollmentPath(project:string,location:string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; - } - - /** - * Parse the location from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified projectLocationControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - projectLocationControlsPath(project:string,location:string,control:string) { - return this.pathTemplates.projectLocationControlsPathTemplate.render({ - project: project, - location: location, - control: control, - }); - } - - /** - * Parse the project from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; - } - - /** - * Parse the location from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; - } - - /** - * Parse the control from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; - } - - /** - * Return a fully-qualified projectLocationFindingSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ - project: project, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the project from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ - project: project, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified projectLocationFrameworkAudits resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ - project: project, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ - project: project, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified projectLocationFrameworks resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - projectLocationFrameworksPath(project:string,location:string,framework:string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ - project: project, - location: location, - framework: framework, - }); - } - - /** - * Parse the project from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; - } - - /** - * Parse the location from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; - } - - /** - * Parse the framework from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.auditStub && !this._terminated) { - return this.auditStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json deleted file mode 100644 index 13323b6af6b..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_client_config.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "interfaces": { - "google.cloud.cloudsecuritycompliance.v1.Audit": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "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 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "GenerateFrameworkAuditScopeReport": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateFrameworkAudit": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListFrameworkAudits": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetFrameworkAudit": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json deleted file mode 100644 index 465d3b67d8b..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/audit_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" -] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts deleted file mode 100644 index 4424c6801d2..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts +++ /dev/null @@ -1,2106 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, LocationsClient, LocationProtos} from 'google-gax'; - -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1/cm_enrollment_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './cm_enrollment_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Service describing CmEnrollment related RPCs for - * complianceManager. - * @class - * @memberof v1 - */ -export class CmEnrollmentServiceClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('cloudsecuritycompliance'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - cmEnrollmentServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of CmEnrollmentServiceClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. - * 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 CmEnrollmentServiceClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof CmEnrollmentServiceClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' - ), - folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cmEnrollment' - ), - organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/controls/{control}' - ), - organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' - ), - organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' - ), - organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' - ), - projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cmEnrollment' - ), - projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/controls/{control}' - ), - projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' - ), - projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' - ), - projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworks/{framework}' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.cmEnrollmentServiceStub) { - return this.cmEnrollmentServiceStub; - } - - // Put together the "service stub" for - // google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService. - this.cmEnrollmentServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const cmEnrollmentServiceStubMethods = - ['updateCmEnrollment', 'calculateEffectiveCmEnrollment']; - for (const methodName of cmEnrollmentServiceStubMethods) { - const callPromise = this.cmEnrollmentServiceStub.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 = - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.cmEnrollmentServiceStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * 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 -- - // ------------------- -/** - * Updates the Compliance Manager enrollment for a resource to facilitate - * an audit. - * Use this method to enroll a resource in Compliance Manager or to - * create or update feature-specific configurations. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.cloudsecuritycompliance.v1.CmEnrollment} request.cmEnrollment - * Required. The Compliance Manager enrollment to update. - * The `name` field is used to identify the settings that you want to update. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. The list of fields that you want to update. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CmEnrollment|CmEnrollment}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cm_enrollment_service.update_cm_enrollment.js - * region_tag:cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_async - */ - updateCmEnrollment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|undefined, {}|undefined - ]>; - updateCmEnrollment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, - {}|null|undefined>): void; - updateCmEnrollment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, - {}|null|undefined>): void; - updateCmEnrollment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'cm_enrollment.name': request.cmEnrollment!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateCmEnrollment request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateCmEnrollment response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateCmEnrollment(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCmEnrollmentRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateCmEnrollment response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Calculates the effective Compliance Manager enrollment for a resource. - * An effective enrollment is either a direct enrollment of a - * resource (if it exists), or an enrollment of the closest parent of a - * resource that's enrolled in Compliance Manager. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the Compliance Manager enrollment to calculate. - * - * Supported formats are the following: - * - * * `organizations/{organization_id}/locations/{location}/cmEnrollment` - * * `folders/{folder_id}/locations/{location}/cmEnrollment` - * * `projects/{project_id}/locations/{location}/cmEnrollment` - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse|CalculateEffectiveCmEnrollmentResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cm_enrollment_service.calculate_effective_cm_enrollment.js - * region_tag:cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_async - */ - calculateEffectiveCmEnrollment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|undefined, {}|undefined - ]>; - calculateEffectiveCmEnrollment( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, - {}|null|undefined>): void; - calculateEffectiveCmEnrollment( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, - {}|null|undefined>): void; - calculateEffectiveCmEnrollment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('calculateEffectiveCmEnrollment request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('calculateEffectiveCmEnrollment response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.calculateEffectiveCmEnrollment(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse, - protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentRequest|undefined, - {}|undefined - ]) => { - this._log.info('calculateEffectiveCmEnrollment response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * 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 {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 -- - // -------------------- - - /** - * Return a fully-qualified folderLocationFindingSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ - folder: folder, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the folder from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified organizationLocationCloudControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified organizationLocationCmEnrollment resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationCmEnrollmentPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; - } - - /** - * Parse the location from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified organizationLocationControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - organizationLocationControlsPath(organization:string,location:string,control:string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.render({ - organization: organization, - location: location, - control: control, - }); - } - - /** - * Parse the organization from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; - } - - /** - * Parse the control from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; - } - - /** - * Return a fully-qualified organizationLocationFindingSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ - organization: organization, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ - organization: organization, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAudits resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ - organization: organization, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ - organization: organization, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified organizationLocationFrameworks resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - organizationLocationFrameworksPath(organization:string,location:string,framework:string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ - organization: organization, - location: location, - framework: framework, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; - } - - /** - * Parse the framework from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; - } - - /** - * Return a fully-qualified projectLocationCloudControlDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ - project: project, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the project from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified projectLocationCloudControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ - project: project, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the project from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified projectLocationCmEnrollment resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - projectLocationCmEnrollmentPath(project:string,location:string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; - } - - /** - * Parse the location from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified projectLocationControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - projectLocationControlsPath(project:string,location:string,control:string) { - return this.pathTemplates.projectLocationControlsPathTemplate.render({ - project: project, - location: location, - control: control, - }); - } - - /** - * Parse the project from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; - } - - /** - * Parse the location from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; - } - - /** - * Parse the control from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; - } - - /** - * Return a fully-qualified projectLocationFindingSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ - project: project, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the project from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ - project: project, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified projectLocationFrameworkAudits resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ - project: project, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ - project: project, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified projectLocationFrameworks resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - projectLocationFrameworksPath(project:string,location:string,framework:string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ - project: project, - location: location, - framework: framework, - }); - } - - /** - * Parse the project from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; - } - - /** - * Parse the location from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; - } - - /** - * Parse the framework from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.cmEnrollmentServiceStub && !this._terminated) { - return this.cmEnrollmentServiceStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json deleted file mode 100644 index 22c9a9fecaa..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client_config.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "interfaces": { - "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "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 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "UpdateCmEnrollment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CalculateEffectiveCmEnrollment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json deleted file mode 100644 index 465d3b67d8b..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" -] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts deleted file mode 100644 index ae9357e3240..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts +++ /dev/null @@ -1,3309 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1/config_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './config_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Config Service manages compliance frameworks, cloud controls, and their - * configurations. - * @class - * @memberof v1 - */ -export class ConfigClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('cloudsecuritycompliance'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - configStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ConfigClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. - * 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 ConfigClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof ConfigClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' - ), - folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}' - ), - organizationLocationPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}' - ), - organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cmEnrollment' - ), - organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/controls/{control}' - ), - organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' - ), - organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' - ), - organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' - ), - projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cmEnrollment' - ), - projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/controls/{control}' - ), - projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' - ), - projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' - ), - projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworks/{framework}' - ), - }; - - // 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 = { - listFrameworks: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworks'), - listCloudControls: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'cloudControls') - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.cloudsecuritycompliance.v1.Config', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.configStub) { - return this.configStub; - } - - // Put together the "service stub" for - // google.cloud.cloudsecuritycompliance.v1.Config. - this.configStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Config') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Config, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const configStubMethods = - ['listFrameworks', 'getFramework', 'createFramework', 'updateFramework', 'deleteFramework', 'listCloudControls', 'getCloudControl', 'createCloudControl', 'updateCloudControl', 'deleteCloudControl']; - for (const methodName of configStubMethods) { - const callPromise = this.configStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.configStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * 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 -- - // ------------------- -/** - * Gets details about a framework. - * This method retrieves the latest major version of the framework. - * - * To retrieve a specific major version, include `major_revision_id` in - * the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the framework to retrieve, in one of the following - * formats: - * `organizations/{organization}/locations/{location}/frameworks/{framework}` - * or - * `projects/{project}/locations/{location}/frameworks/{framework}`. - * - * The only supported location is `global`. - * @param {number} [request.majorRevisionId] - * Optional. The framework major version to retrieve. If not specified, the - * most recently updated `revision_id` is retrieved. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_framework.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_GetFramework_async - */ - getFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|undefined, {}|undefined - ]>; - getFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, - {}|null|undefined>): void; - getFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, - {}|null|undefined>): void; - getFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getFramework request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getFramework response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getFramework(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkRequest|undefined, - {}|undefined - ]) => { - this._log.info('getFramework response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Creates a custom framework in a given parent resource. - * You can't create built-in frameworks because those are managed by - * Google. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {string} request.frameworkId - * Required. The identifier (ID) of the framework. The ID is not the full name - * of the framework; it's the last part of the full name of the framework. - * @param {google.cloud.cloudsecuritycompliance.v1.Framework} request.framework - * Required. The resource being created. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.create_framework.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_CreateFramework_async - */ - createFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|undefined, {}|undefined - ]>; - createFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, - {}|null|undefined>): void; - createFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, - {}|null|undefined>): void; - createFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('createFramework request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createFramework response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.createFramework(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkRequest|undefined, - {}|undefined - ]) => { - this._log.info('createFramework response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a custom framework. - * This method allows for partial updates of a framework. Use the - * `update_mask` to specify which fields to update. Consider the following: - * - * - If you provide an `update_mask`, only the fields that are specified - * in the mask are updated. - * - If you don't provide an `update_mask`, all the fields that are present - * in the request's `framework` body are used to overwrite the existing - * resource. - * - * You can only update frameworks with the `CUSTOM` type. - * A successful update creates a new version of the framework. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. A field mask is used to specify the fields to be overwritten in - * the framework resource by the update. The fields specified in the - * `update_mask` are relative to the resource, not the full request. A field - * is overwritten if it is in the mask. If you don't provide a mask then all - * fields present in the request will be overwritten. - * @param {google.cloud.cloudsecuritycompliance.v1.Framework} request.framework - * Required. The resource that is being updated. - * @param {number} [request.majorRevisionId] - * Optional. The major version ID of the framework to update. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.update_framework.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_UpdateFramework_async - */ - updateFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|undefined, {}|undefined - ]>; - updateFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, - {}|null|undefined>): void; - updateFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, - {}|null|undefined>): void; - updateFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'framework.name': request.framework!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateFramework request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateFramework response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateFramework(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateFrameworkRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateFramework response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Deletes a custom framework, including all its major and - * minor revisions. Consider the following: - * - * - You can't delete built-in frameworks. You can only delete frameworks - * with type `CUSTOM`. - * - You can't delete frameworks that are deployed to a resource. - * - You can't restore a deleted framework. This action is permanent. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the resource, in one of the following formats: - * `organizations/{organization}/locations/{location}/frameworks/{framework}` - * or - * `projects/{project}/locations/{location}/frameworks/{framework}`. - * - * The only supported location is `global`. - * @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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.delete_framework.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_DeleteFramework_async - */ - deleteFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|undefined, {}|undefined - ]>; - deleteFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, - {}|null|undefined>): void; - deleteFramework( - request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, - {}|null|undefined>): void; - deleteFramework( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('deleteFramework request %j', request); - const wrappedCallback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteFramework response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.deleteFramework(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkRequest|undefined, - {}|undefined - ]) => { - this._log.info('deleteFramework response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets details about a cloud control. - * This method retrieves the latest major version of a cloud control that - * you identify by name. - * - * By default, the latest major version of the cloud control is returned. - * To retrieve a specific major version, include `major_revision_id` in - * the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the cloud control to retrieve, in one of the - * following formats: - * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - * or - * `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - * - * The only supported location is `global`. - * @param {number} [request.majorRevisionId] - * Optional. The major version of the cloud control to retrieve. If not - * specified, the most recently updated `revision_id` is retrieved. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.get_cloud_control.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_GetCloudControl_async - */ - getCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|undefined, {}|undefined - ]>; - getCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, - {}|null|undefined>): void; - getCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, - {}|null|undefined>): void; - getCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getCloudControl request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getCloudControl response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getCloudControl(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlRequest|undefined, - {}|undefined - ]) => { - this._log.info('getCloudControl response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Creates a custom cloud control in a given parent - * resource. - * You can't create built-in cloud controls because those are managed by - * Google. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}`. - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {string} request.cloudControlId - * Required. The identifier for the cloud control, which is the last segment - * of the cloud control name. The format is - * `^{@link protos.a-zA-Z0-9-|a-zA-Z}{0,61}[a-zA-Z0-9]$`. - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} request.cloudControl - * Required. The cloud control that's being created. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.create_cloud_control.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_async - */ - createCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|undefined, {}|undefined - ]>; - createCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, - {}|null|undefined>): void; - createCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, - {}|null|undefined>): void; - createCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('createCloudControl request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createCloudControl response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.createCloudControl(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.ICreateCloudControlRequest|undefined, - {}|undefined - ]) => { - this._log.info('createCloudControl response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Updates a custom cloud control. - * This method allows for partial updates of a cloud control. Use the - * `update_mask` to specify which fields to update. Consider the following: - * - * - If you provide an `update_mask`, only the fields that are specified - * in the mask are updated. - * - If you don't provide an `update_mask`, all the fields that are present - * in the request's `cloud_control` body are used to overwrite the existing - * resource. - * - * You can only update cloud controls with the `CUSTOM` type. - * A successful update creates a new version of the cloud control. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Use a field mask to specify the fields to be overwritten in the - * cloud control during the update. - * The fields that you specify in the `update_mask` are relative to the - * cloud control, not the full request. A field is overwritten if it is in - * the mask. If you don't provide a mask, all fields in the request - * are updated. - * - * You can update the following fields: - * - * - Display name - * - Description - * - Parameters - * - Rules - * - Parameter specification - * @param {google.cloud.cloudsecuritycompliance.v1.CloudControl} request.cloudControl - * Required. The cloud control that you're updating. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.update_cloud_control.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_async - */ - updateCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|undefined, {}|undefined - ]>; - updateCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, - {}|null|undefined>): void; - updateCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, - {}|null|undefined>): void; - updateCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'cloud_control.name': request.cloudControl!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('updateCloudControl request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('updateCloudControl response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.updateCloudControl(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl, - protos.google.cloud.cloudsecuritycompliance.v1.IUpdateCloudControlRequest|undefined, - {}|undefined - ]) => { - this._log.info('updateCloudControl response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Deletes a custom cloud control, including all its - * major and minor revisions. Consider the following: - * - * - You can't delete built-in cloud controls. You can only delete cloud - * controls with type `CUSTOM`. - * - You can't delete cloud controls if any of the versions are referenced - * by a framework. - * - You can't restore a deleted cloud control. This action is permanent. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the cloud control to delete, in one of the following - * formats: - * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` - * or - * `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. - * - * The only supported location is `global`. - * @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 {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.delete_cloud_control.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_async - */ - deleteCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|undefined, {}|undefined - ]>; - deleteCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, - {}|null|undefined>): void; - deleteCloudControl( - request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, - {}|null|undefined>): void; - deleteCloudControl( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('deleteCloudControl request %j', request); - const wrappedCallback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteCloudControl response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.deleteCloudControl(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - protos.google.cloud.cloudsecuritycompliance.v1.IDeleteCloudControlRequest|undefined, - {}|undefined - ]) => { - this._log.info('deleteCloudControl response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - - /** - * Lists the frameworks (both built-in and custom) that are available within - * the parent resource. The latest major version of each framework is - * returned. - * This method supports pagination. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The maximum number of frameworks to return. The default value is - * `500`. - * - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request to list - * frameworks. Provide this token to retrieve the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. - * 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 `listFrameworksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworks( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse - ]>; - listFrameworks( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFramework>): void; - listFrameworks( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFramework>): void; - listFrameworks( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFramework>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFramework>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFramework>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFrameworks values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listFrameworks request %j', request); - return this.innerApiCalls - .listFrameworks(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFramework[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksResponse - ]) => { - this._log.info('listFrameworks values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listFrameworks`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The maximum number of frameworks to return. The default value is - * `500`. - * - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request to list - * frameworks. Provide this token to retrieve the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework} 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 `listFrameworksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworksStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworks stream %j', request); - return this.descriptors.page.listFrameworks.createStream( - this.innerApiCalls.listFrameworks as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFrameworks`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The maximum number of frameworks to return. The default value is - * `500`. - * - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request to list - * frameworks. Provide this token to retrieve the next page of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.Framework|Framework}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_frameworks.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_ListFrameworks_async - */ - listFrameworksAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworksRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworks iterate %j', request); - return this.descriptors.page.listFrameworks.asyncIterate( - this.innerApiCalls['listFrameworks'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists the cloud controls (both built-in and custom) that are available - * in a given parent resource. The latest major version of each cloud control - * is returned. - * This method supports pagination. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The maximum number of cloud controls to return. The default value - * is `500`. - * - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - * @param {string} [request.pageToken] - * Optional. A pagination token that's returned from a previous request to - * list cloud controls. Provide this token to retrieve the next page of - * results. - * - * When paginating, the parent that you provide to the - * {@link protos.google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls|ListCloudControls} - * request must match the call that provided the page token. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. - * 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 `listCloudControlsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listCloudControls( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[], - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse - ]>; - listCloudControls( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>): void; - listCloudControls( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>): void; - listCloudControls( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[], - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listCloudControls values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listCloudControls request %j', request); - return this.innerApiCalls - .listCloudControls(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[], - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsResponse - ]) => { - this._log.info('listCloudControls values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listCloudControls`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The maximum number of cloud controls to return. The default value - * is `500`. - * - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - * @param {string} [request.pageToken] - * Optional. A pagination token that's returned from a previous request to - * list cloud controls. Provide this token to retrieve the next page of - * results. - * - * When paginating, the parent that you provide to the - * {@link protos.google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls|ListCloudControls} - * request must match the call that provided the page token. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl} 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 `listCloudControlsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listCloudControlsStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listCloudControls']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listCloudControls stream %j', request); - return this.descriptors.page.listCloudControls.createStream( - this.innerApiCalls.listCloudControls as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listCloudControls`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource name, in one of the following formats: - * - `organizations/{organization}/locations/{location}` - * - `projects/{project}/locations/{location}`. - * - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The maximum number of cloud controls to return. The default value - * is `500`. - * - * If you exceed the maximum value of `1000`, then the service uses the - * maximum value. - * @param {string} [request.pageToken] - * Optional. A pagination token that's returned from a previous request to - * list cloud controls. Provide this token to retrieve the next page of - * results. - * - * When paginating, the parent that you provide to the - * {@link protos.google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls|ListCloudControls} - * request must match the call that provided the 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControl|CloudControl}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/config.list_cloud_controls.js - * region_tag:cloudsecuritycompliance_v1_generated_Config_ListCloudControls_async - */ - listCloudControlsAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listCloudControls']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listCloudControls iterate %j', request); - return this.descriptors.page.listCloudControls.asyncIterate( - this.innerApiCalls['listCloudControls'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 -- - // -------------------- - - /** - * Return a fully-qualified folderLocationFindingSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ - folder: folder, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the folder from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organization resource name string. - * - * @param {string} organization - * @returns {string} Resource name string. - */ - organizationPath(organization:string) { - return this.pathTemplates.organizationPathTemplate.render({ - organization: organization, - }); - } - - /** - * Parse the organization from Organization resource. - * - * @param {string} organizationName - * A fully-qualified path representing Organization resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationName(organizationName: string) { - return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; - } - - /** - * Return a fully-qualified organizationLocation resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocation resource. - * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; - } - - /** - * Parse the location from OrganizationLocation resource. - * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; - } - - /** - * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified organizationLocationCloudControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified organizationLocationCmEnrollment resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationCmEnrollmentPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; - } - - /** - * Parse the location from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified organizationLocationControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - organizationLocationControlsPath(organization:string,location:string,control:string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.render({ - organization: organization, - location: location, - control: control, - }); - } - - /** - * Parse the organization from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; - } - - /** - * Parse the control from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; - } - - /** - * Return a fully-qualified organizationLocationFindingSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ - organization: organization, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ - organization: organization, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAudits resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ - organization: organization, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ - organization: organization, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified organizationLocationFrameworks resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - organizationLocationFrameworksPath(organization:string,location:string,framework:string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ - organization: organization, - location: location, - framework: framework, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; - } - - /** - * Parse the framework from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; - } - - /** - * Return a fully-qualified projectLocationCloudControlDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ - project: project, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the project from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified projectLocationCloudControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ - project: project, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the project from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified projectLocationCmEnrollment resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - projectLocationCmEnrollmentPath(project:string,location:string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; - } - - /** - * Parse the location from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified projectLocationControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - projectLocationControlsPath(project:string,location:string,control:string) { - return this.pathTemplates.projectLocationControlsPathTemplate.render({ - project: project, - location: location, - control: control, - }); - } - - /** - * Parse the project from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; - } - - /** - * Parse the location from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; - } - - /** - * Parse the control from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; - } - - /** - * Return a fully-qualified projectLocationFindingSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ - project: project, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the project from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ - project: project, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified projectLocationFrameworkAudits resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ - project: project, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ - project: project, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified projectLocationFrameworks resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - projectLocationFrameworksPath(project:string,location:string,framework:string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ - project: project, - location: location, - framework: framework, - }); - } - - /** - * Parse the project from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; - } - - /** - * Parse the location from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; - } - - /** - * Parse the framework from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.configStub && !this._terminated) { - return this.configStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json deleted file mode 100644 index cb2f3d7418e..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_client_config.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "interfaces": { - "google.cloud.cloudsecuritycompliance.v1.Config": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "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 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListFrameworks": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetFramework": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateFramework": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateFramework": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteFramework": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListCloudControls": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetCloudControl": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateCloudControl": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCloudControl": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteCloudControl": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json deleted file mode 100644 index 465d3b67d8b..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/config_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" -] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts deleted file mode 100644 index b7dba1fd676..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts +++ /dev/null @@ -1,3169 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1/deployment_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './deployment_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Deployment service allows users to manage deployments of Frameworks and - * Cloud Controls on a target resource. - * @class - * @memberof v1 - */ -export class DeploymentClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('cloudsecuritycompliance'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - deploymentStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DeploymentClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. - * 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 DeploymentClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof DeploymentClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' - ), - folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}' - ), - organizationLocationPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}' - ), - organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cmEnrollment' - ), - organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/controls/{control}' - ), - organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' - ), - organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' - ), - organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' - ), - projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cmEnrollment' - ), - projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/controls/{control}' - ), - projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' - ), - projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' - ), - projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworks/{framework}' - ), - }; - - // 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 = { - listFrameworkDeployments: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworkDeployments'), - listCloudControlDeployments: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'cloudControlDeployments') - }; - - const protoFilesRoot = this._gaxModule.protobufFromJSON(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) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}',}], - },{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',additional_bindings: [{get: '/v1/{name=projects/*}/locations',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=projects/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}/operations',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createFrameworkDeploymentResponse = protoFilesRoot.lookup( - '.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment') as gax.protobuf.Type; - const createFrameworkDeploymentMetadata = protoFilesRoot.lookup( - '.google.cloud.cloudsecuritycompliance.v1.OperationMetadata') as gax.protobuf.Type; - const deleteFrameworkDeploymentResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteFrameworkDeploymentMetadata = protoFilesRoot.lookup( - '.google.cloud.cloudsecuritycompliance.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createFrameworkDeployment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createFrameworkDeploymentResponse.decode.bind(createFrameworkDeploymentResponse), - createFrameworkDeploymentMetadata.decode.bind(createFrameworkDeploymentMetadata)), - deleteFrameworkDeployment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteFrameworkDeploymentResponse.decode.bind(deleteFrameworkDeploymentResponse), - deleteFrameworkDeploymentMetadata.decode.bind(deleteFrameworkDeploymentMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.cloudsecuritycompliance.v1.Deployment', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.deploymentStub) { - return this.deploymentStub; - } - - // Put together the "service stub" for - // google.cloud.cloudsecuritycompliance.v1.Deployment. - this.deploymentStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Deployment') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Deployment, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const deploymentStubMethods = - ['createFrameworkDeployment', 'deleteFrameworkDeployment', 'getFrameworkDeployment', 'listFrameworkDeployments', 'getCloudControlDeployment', 'listCloudControlDeployments']; - for (const methodName of deploymentStubMethods) { - const callPromise = this.deploymentStub.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._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.deploymentStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * 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 -- - // ------------------- -/** - * Gets details about a framework deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the framework deployment, in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - * or - * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - * The only supported location is `global`. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.get_framework_deployment.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_async - */ - getFrameworkDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|undefined, {}|undefined - ]>; - getFrameworkDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, - {}|null|undefined>): void; - getFrameworkDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, - {}|null|undefined>): void; - getFrameworkDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getFrameworkDeployment request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getFrameworkDeployment response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getFrameworkDeployment(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetFrameworkDeploymentRequest|undefined, - {}|undefined - ]) => { - this._log.info('getFrameworkDeployment response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets details about a cloud control deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name for the cloud control deployment, in the format - * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - * or - * `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - * The only supported location is `global`. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.get_cloud_control_deployment.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_async - */ - getCloudControlDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|undefined, {}|undefined - ]>; - getCloudControlDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, - {}|null|undefined>): void; - getCloudControlDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, - {}|null|undefined>): void; - getCloudControlDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('getCloudControlDeployment request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getCloudControlDeployment response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getCloudControlDeployment(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment, - protos.google.cloud.cloudsecuritycompliance.v1.IGetCloudControlDeploymentRequest|undefined, - {}|undefined - ]) => { - this._log.info('getCloudControlDeployment response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - -/** - * Creates a framework deployment in a given parent resource. A - * framework deployment lets you assign a particular framework version to an - * organization, folder, or project so that you can control and monitor - * those resources using the framework's cloud controls. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the framework deployment in the format - * `organizations/{organization}/locations/{location}` - * or - * `projects/{project}/locations/{location}`. - * Only the global location is supported. - * @param {string} [request.frameworkDeploymentId] - * Optional. An identifier for the framework deployment that's unique in scope - * of the parent. If you don't specify a value, then a random UUID is - * generated. - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment} request.frameworkDeployment - * Required. The framework deployment that you're creating. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.create_framework_deployment.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async - */ - createFrameworkDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createFrameworkDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createFrameworkDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createFrameworkDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.ICreateFrameworkDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createFrameworkDeployment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createFrameworkDeployment request %j', request); - return this.innerApiCalls.createFrameworkDeployment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createFrameworkDeployment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createFrameworkDeployment()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.create_framework_deployment.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_async - */ - async checkCreateFrameworkDeploymentProgress(name: string): Promise>{ - this._log.info('createFrameworkDeployment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createFrameworkDeployment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a framework deployment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the framework deployment that you want to delete, - * in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - * or - * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - * The only supported location is `global`. - * @param {string} [request.etag] - * Optional. An opaque identifier for the current version of the resource. - * - * If you provide this value, then it must match the existing value. If the - * values don't match, then the request fails with an - * {@link protos.google.rpc.Code.ABORTED|`ABORTED`} error. - * - * If you omit this value, then the resource is deleted regardless of its - * current `etag` value. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.delete_framework_deployment.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async - */ - deleteFrameworkDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteFrameworkDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteFrameworkDeployment( - request: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteFrameworkDeployment( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IDeleteFrameworkDeploymentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteFrameworkDeployment response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteFrameworkDeployment request %j', request); - return this.innerApiCalls.deleteFrameworkDeployment(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteFrameworkDeployment response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteFrameworkDeployment()`. - * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.delete_framework_deployment.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_async - */ - async checkDeleteFrameworkDeploymentProgress(name: string): Promise>{ - this._log.info('deleteFrameworkDeployment long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteFrameworkDeployment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists the framework deployments in a given parent resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}` - * or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. - * If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies a page of results the server should - * return. - * @param {string} [request.filter] - * Optional. The filter to be applied on the resource, as defined by - * [AIP-160: Filtering](https://google.aip.dev/160). - * @param {string} [request.orderBy] - * Optional. The sort order for the results. The following values are - * supported: - * - * * `name` - * * `name desc` - * - * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment}. - * 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 `listFrameworkDeploymentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworkDeployments( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse - ]>; - listFrameworkDeployments( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>): void; - listFrameworkDeployments( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>): void; - listFrameworkDeployments( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFrameworkDeployments values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listFrameworkDeployments request %j', request); - return this.innerApiCalls - .listFrameworkDeployments(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsResponse - ]) => { - this._log.info('listFrameworkDeployments values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listFrameworkDeployments`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}` - * or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. - * If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies a page of results the server should - * return. - * @param {string} [request.filter] - * Optional. The filter to be applied on the resource, as defined by - * [AIP-160: Filtering](https://google.aip.dev/160). - * @param {string} [request.orderBy] - * Optional. The sort order for the results. The following values are - * supported: - * - * * `name` - * * `name desc` - * - * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment} 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 `listFrameworkDeploymentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworkDeploymentsStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworkDeployments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworkDeployments stream %j', request); - return this.descriptors.page.listFrameworkDeployments.createStream( - this.innerApiCalls.listFrameworkDeployments as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFrameworkDeployments`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}` - * or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. - * If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies a page of results the server should - * return. - * @param {string} [request.filter] - * Optional. The filter to be applied on the resource, as defined by - * [AIP-160: Filtering](https://google.aip.dev/160). - * @param {string} [request.orderBy] - * Optional. The sort order for the results. The following values are - * supported: - * - * * `name` - * * `name desc` - * - * If you do not specify a value, then the results are not 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment|FrameworkDeployment}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.list_framework_deployments.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_async - */ - listFrameworkDeploymentsAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkDeploymentsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworkDeployments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworkDeployments iterate %j', request); - return this.descriptors.page.listFrameworkDeployments.asyncIterate( - this.innerApiCalls['listFrameworkDeployments'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists the cloud conrol deployments in a given parent resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}` or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * you requested. - * If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filter to apply on the resource, as defined by - * [AIP-160: Filtering](https://google.aip.dev/160). - * @param {string} [request.orderBy] - * Optional. The sort order for the results. The following values are - * supported: - * - * * `name` - * * `name desc` - * - * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment}. - * 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 `listCloudControlDeploymentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listCloudControlDeployments( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[], - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse - ]>; - listCloudControlDeployments( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>): void; - listCloudControlDeployments( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>): void; - listCloudControlDeployments( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[], - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listCloudControlDeployments values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listCloudControlDeployments request %j', request); - return this.innerApiCalls - .listCloudControlDeployments(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[], - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsResponse - ]) => { - this._log.info('listCloudControlDeployments values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listCloudControlDeployments`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}` or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * you requested. - * If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filter to apply on the resource, as defined by - * [AIP-160: Filtering](https://google.aip.dev/160). - * @param {string} [request.orderBy] - * Optional. The sort order for the results. The following values are - * supported: - * - * * `name` - * * `name desc` - * - * If you do not specify a value, then the results are not 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 {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment} 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 `listCloudControlDeploymentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listCloudControlDeploymentsStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listCloudControlDeployments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listCloudControlDeployments stream %j', request); - return this.descriptors.page.listCloudControlDeployments.createStream( - this.innerApiCalls.listCloudControlDeployments as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listCloudControlDeployments`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}` or - * `projects/{project}/locations/{location}`. - * The only supported location is `global`. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * you requested. - * If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filter to apply on the resource, as defined by - * [AIP-160: Filtering](https://google.aip.dev/160). - * @param {string} [request.orderBy] - * Optional. The sort order for the results. The following values are - * supported: - * - * * `name` - * * `name desc` - * - * If you do not specify a value, then the results are not 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment|CloudControlDeployment}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/deployment.list_cloud_control_deployments.js - * region_tag:cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_async - */ - listCloudControlDeploymentsAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListCloudControlDeploymentsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listCloudControlDeployments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listCloudControlDeployments iterate %j', request); - return this.descriptors.page.listCloudControlDeployments.asyncIterate( - this.innerApiCalls['listCloudControlDeployments'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * 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 - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. 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.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - 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'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified folderLocationFindingSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ - folder: folder, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the folder from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organization resource name string. - * - * @param {string} organization - * @returns {string} Resource name string. - */ - organizationPath(organization:string) { - return this.pathTemplates.organizationPathTemplate.render({ - organization: organization, - }); - } - - /** - * Parse the organization from Organization resource. - * - * @param {string} organizationName - * A fully-qualified path representing Organization resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationName(organizationName: string) { - return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; - } - - /** - * Return a fully-qualified organizationLocation resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocation resource. - * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; - } - - /** - * Parse the location from OrganizationLocation resource. - * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; - } - - /** - * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified organizationLocationCloudControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified organizationLocationCmEnrollment resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationCmEnrollmentPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; - } - - /** - * Parse the location from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified organizationLocationControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - organizationLocationControlsPath(organization:string,location:string,control:string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.render({ - organization: organization, - location: location, - control: control, - }); - } - - /** - * Parse the organization from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; - } - - /** - * Parse the control from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; - } - - /** - * Return a fully-qualified organizationLocationFindingSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ - organization: organization, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ - organization: organization, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAudits resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ - organization: organization, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ - organization: organization, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified organizationLocationFrameworks resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - organizationLocationFrameworksPath(organization:string,location:string,framework:string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ - organization: organization, - location: location, - framework: framework, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; - } - - /** - * Parse the framework from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; - } - - /** - * Return a fully-qualified projectLocationCloudControlDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ - project: project, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the project from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified projectLocationCloudControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ - project: project, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the project from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified projectLocationCmEnrollment resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - projectLocationCmEnrollmentPath(project:string,location:string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; - } - - /** - * Parse the location from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified projectLocationControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - projectLocationControlsPath(project:string,location:string,control:string) { - return this.pathTemplates.projectLocationControlsPathTemplate.render({ - project: project, - location: location, - control: control, - }); - } - - /** - * Parse the project from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; - } - - /** - * Parse the location from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; - } - - /** - * Parse the control from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; - } - - /** - * Return a fully-qualified projectLocationFindingSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ - project: project, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the project from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ - project: project, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified projectLocationFrameworkAudits resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ - project: project, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ - project: project, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified projectLocationFrameworks resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - projectLocationFrameworksPath(project:string,location:string,framework:string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ - project: project, - location: location, - framework: framework, - }); - } - - /** - * Parse the project from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; - } - - /** - * Parse the location from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; - } - - /** - * Parse the framework from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.deploymentStub && !this._terminated) { - return this.deploymentStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json deleted file mode 100644 index e5663f0c004..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_client_config.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "interfaces": { - "google.cloud.cloudsecuritycompliance.v1.Deployment": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "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 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateFrameworkDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteFrameworkDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetFrameworkDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListFrameworkDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetCloudControlDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListCloudControlDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json deleted file mode 100644 index 465d3b67d8b..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/deployment_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" -] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json deleted file mode 100644 index 9131f18ffe4..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/gapic_metadata.json +++ /dev/null @@ -1,381 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.cloudsecuritycompliance.v1", - "libraryPackage": "@google-cloud/cloudsecuritycompliance", - "services": { - "Audit": { - "clients": { - "grpc": { - "libraryClient": "AuditClient", - "rpcs": { - "GenerateFrameworkAuditScopeReport": { - "methods": [ - "generateFrameworkAuditScopeReport" - ] - }, - "GetFrameworkAudit": { - "methods": [ - "getFrameworkAudit" - ] - }, - "CreateFrameworkAudit": { - "methods": [ - "createFrameworkAudit" - ] - }, - "ListFrameworkAudits": { - "methods": [ - "listFrameworkAudits", - "listFrameworkAuditsStream", - "listFrameworkAuditsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "AuditClient", - "rpcs": { - "GenerateFrameworkAuditScopeReport": { - "methods": [ - "generateFrameworkAuditScopeReport" - ] - }, - "GetFrameworkAudit": { - "methods": [ - "getFrameworkAudit" - ] - }, - "CreateFrameworkAudit": { - "methods": [ - "createFrameworkAudit" - ] - }, - "ListFrameworkAudits": { - "methods": [ - "listFrameworkAudits", - "listFrameworkAuditsStream", - "listFrameworkAuditsAsync" - ] - } - } - } - } - }, - "CmEnrollmentService": { - "clients": { - "grpc": { - "libraryClient": "CmEnrollmentServiceClient", - "rpcs": { - "UpdateCmEnrollment": { - "methods": [ - "updateCmEnrollment" - ] - }, - "CalculateEffectiveCmEnrollment": { - "methods": [ - "calculateEffectiveCmEnrollment" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "CmEnrollmentServiceClient", - "rpcs": { - "UpdateCmEnrollment": { - "methods": [ - "updateCmEnrollment" - ] - }, - "CalculateEffectiveCmEnrollment": { - "methods": [ - "calculateEffectiveCmEnrollment" - ] - } - } - } - } - }, - "Config": { - "clients": { - "grpc": { - "libraryClient": "ConfigClient", - "rpcs": { - "GetFramework": { - "methods": [ - "getFramework" - ] - }, - "CreateFramework": { - "methods": [ - "createFramework" - ] - }, - "UpdateFramework": { - "methods": [ - "updateFramework" - ] - }, - "DeleteFramework": { - "methods": [ - "deleteFramework" - ] - }, - "GetCloudControl": { - "methods": [ - "getCloudControl" - ] - }, - "CreateCloudControl": { - "methods": [ - "createCloudControl" - ] - }, - "UpdateCloudControl": { - "methods": [ - "updateCloudControl" - ] - }, - "DeleteCloudControl": { - "methods": [ - "deleteCloudControl" - ] - }, - "ListFrameworks": { - "methods": [ - "listFrameworks", - "listFrameworksStream", - "listFrameworksAsync" - ] - }, - "ListCloudControls": { - "methods": [ - "listCloudControls", - "listCloudControlsStream", - "listCloudControlsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ConfigClient", - "rpcs": { - "GetFramework": { - "methods": [ - "getFramework" - ] - }, - "CreateFramework": { - "methods": [ - "createFramework" - ] - }, - "UpdateFramework": { - "methods": [ - "updateFramework" - ] - }, - "DeleteFramework": { - "methods": [ - "deleteFramework" - ] - }, - "GetCloudControl": { - "methods": [ - "getCloudControl" - ] - }, - "CreateCloudControl": { - "methods": [ - "createCloudControl" - ] - }, - "UpdateCloudControl": { - "methods": [ - "updateCloudControl" - ] - }, - "DeleteCloudControl": { - "methods": [ - "deleteCloudControl" - ] - }, - "ListFrameworks": { - "methods": [ - "listFrameworks", - "listFrameworksStream", - "listFrameworksAsync" - ] - }, - "ListCloudControls": { - "methods": [ - "listCloudControls", - "listCloudControlsStream", - "listCloudControlsAsync" - ] - } - } - } - } - }, - "Deployment": { - "clients": { - "grpc": { - "libraryClient": "DeploymentClient", - "rpcs": { - "GetFrameworkDeployment": { - "methods": [ - "getFrameworkDeployment" - ] - }, - "GetCloudControlDeployment": { - "methods": [ - "getCloudControlDeployment" - ] - }, - "CreateFrameworkDeployment": { - "methods": [ - "createFrameworkDeployment" - ] - }, - "DeleteFrameworkDeployment": { - "methods": [ - "deleteFrameworkDeployment" - ] - }, - "ListFrameworkDeployments": { - "methods": [ - "listFrameworkDeployments", - "listFrameworkDeploymentsStream", - "listFrameworkDeploymentsAsync" - ] - }, - "ListCloudControlDeployments": { - "methods": [ - "listCloudControlDeployments", - "listCloudControlDeploymentsStream", - "listCloudControlDeploymentsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DeploymentClient", - "rpcs": { - "GetFrameworkDeployment": { - "methods": [ - "getFrameworkDeployment" - ] - }, - "GetCloudControlDeployment": { - "methods": [ - "getCloudControlDeployment" - ] - }, - "CreateFrameworkDeployment": { - "methods": [ - "createFrameworkDeployment" - ] - }, - "DeleteFrameworkDeployment": { - "methods": [ - "deleteFrameworkDeployment" - ] - }, - "ListFrameworkDeployments": { - "methods": [ - "listFrameworkDeployments", - "listFrameworkDeploymentsStream", - "listFrameworkDeploymentsAsync" - ] - }, - "ListCloudControlDeployments": { - "methods": [ - "listCloudControlDeployments", - "listCloudControlDeploymentsStream", - "listCloudControlDeploymentsAsync" - ] - } - } - } - } - }, - "Monitoring": { - "clients": { - "grpc": { - "libraryClient": "MonitoringClient", - "rpcs": { - "FetchFrameworkComplianceReport": { - "methods": [ - "fetchFrameworkComplianceReport" - ] - }, - "AggregateFrameworkComplianceReport": { - "methods": [ - "aggregateFrameworkComplianceReport" - ] - }, - "ListFrameworkComplianceSummaries": { - "methods": [ - "listFrameworkComplianceSummaries", - "listFrameworkComplianceSummariesStream", - "listFrameworkComplianceSummariesAsync" - ] - }, - "ListFindingSummaries": { - "methods": [ - "listFindingSummaries", - "listFindingSummariesStream", - "listFindingSummariesAsync" - ] - }, - "ListControlComplianceSummaries": { - "methods": [ - "listControlComplianceSummaries", - "listControlComplianceSummariesStream", - "listControlComplianceSummariesAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "MonitoringClient", - "rpcs": { - "FetchFrameworkComplianceReport": { - "methods": [ - "fetchFrameworkComplianceReport" - ] - }, - "AggregateFrameworkComplianceReport": { - "methods": [ - "aggregateFrameworkComplianceReport" - ] - }, - "ListFrameworkComplianceSummaries": { - "methods": [ - "listFrameworkComplianceSummaries", - "listFrameworkComplianceSummariesStream", - "listFrameworkComplianceSummariesAsync" - ] - }, - "ListFindingSummaries": { - "methods": [ - "listFindingSummaries", - "listFindingSummariesStream", - "listFindingSummariesAsync" - ] - }, - "ListControlComplianceSummaries": { - "methods": [ - "listControlComplianceSummaries", - "listControlComplianceSummariesStream", - "listControlComplianceSummariesAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts deleted file mode 100644 index aee79448a9d..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2026 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 {AuditClient} from './audit_client'; -export {CmEnrollmentServiceClient} from './cm_enrollment_service_client'; -export {ConfigClient} from './config_client'; -export {DeploymentClient} from './deployment_client'; -export {MonitoringClient} from './monitoring_client'; diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts deleted file mode 100644 index 71b4dc65ffa..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts +++ /dev/null @@ -1,2808 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v1/monitoring_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './monitoring_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Service describing handlers for resources - * @class - * @memberof v1 - */ -export class MonitoringClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('cloudsecuritycompliance'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - monitoringStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of MonitoringClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/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/1.1 REST mode. - * 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 MonitoringClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof MonitoringClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'cloudsecuritycompliance.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' - ), - folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - folderLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cmEnrollment' - ), - organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/controls/{control}' - ), - organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' - ), - organizationLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - organizationLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}' - ), - organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - organizationLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), - projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' - ), - projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/cmEnrollment' - ), - projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/controls/{control}' - ), - projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' - ), - projectLocationFrameworkAuditScopeReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}' - ), - projectLocationFrameworkAuditsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkAudits/{framework_audit}' - ), - projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}' - ), - projectLocationFrameworkComplianceReportsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}' - ), - projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' - ), - projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), - projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/frameworks/{framework}' - ), - }; - - // 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 = { - listFrameworkComplianceSummaries: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'frameworkComplianceSummaries'), - listFindingSummaries: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'findingSummaries'), - listControlComplianceSummaries: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controlComplianceSummaries') - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.cloudsecuritycompliance.v1.Monitoring', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.monitoringStub) { - return this.monitoringStub; - } - - // Put together the "service stub" for - // google.cloud.cloudsecuritycompliance.v1.Monitoring. - this.monitoringStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.cloudsecuritycompliance.v1.Monitoring') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.cloudsecuritycompliance.v1.Monitoring, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const monitoringStubMethods = - ['listFrameworkComplianceSummaries', 'listFindingSummaries', 'fetchFrameworkComplianceReport', 'listControlComplianceSummaries', 'aggregateFrameworkComplianceReport']; - for (const methodName of monitoringStubMethods) { - const callPromise = this.monitoringStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.monitoringStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'cloudsecuritycompliance.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * 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 -- - // ------------------- -/** - * Fetches the framework compliance report for a given scope. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the framework compliance report to retrieve. - * @param {google.protobuf.Timestamp} [request.endTime] - * Optional. The end time of the report. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport|FrameworkComplianceReport}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/monitoring.fetch_framework_compliance_report.js - * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_async - */ - fetchFrameworkComplianceReport( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|undefined, {}|undefined - ]>; - fetchFrameworkComplianceReport( - request: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>): void; - fetchFrameworkComplianceReport( - request: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>): void; - fetchFrameworkComplianceReport( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('fetchFrameworkComplianceReport request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('fetchFrameworkComplianceReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.fetchFrameworkComplianceReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport, - protos.google.cloud.cloudsecuritycompliance.v1.IFetchFrameworkComplianceReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('fetchFrameworkComplianceReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } -/** - * Gets the aggregated compliance report over time for a given scope. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the aggregated compliance report over time to - * retrieve. - * - * The supported format is: - * `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - * @param {google.type.Interval} [request.interval] - * Optional. The start and end time range for the aggregated compliance - * report. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse|AggregateFrameworkComplianceReportResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/monitoring.aggregate_framework_compliance_report.js - * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_async - */ - aggregateFrameworkComplianceReport( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|undefined, {}|undefined - ]>; - aggregateFrameworkComplianceReport( - request: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>): void; - aggregateFrameworkComplianceReport( - request: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, - callback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>): void; - aggregateFrameworkComplianceReport( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('aggregateFrameworkComplianceReport request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('aggregateFrameworkComplianceReport response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.aggregateFrameworkComplianceReport(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse, - protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportRequest|undefined, - {}|undefined - ]) => { - this._log.info('aggregateFrameworkComplianceReport response %j', response); - return [response, options, rawResponse]; - }).catch((error: any) => { - if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { - const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); - } - throw error; - }); - } - - /** - * Lists the framework compliance summary for a given scope. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework compliance summary. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] - * Optional. Specifies the level of detail to return in the response. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary|FrameworkComplianceSummary}. - * 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 `listFrameworkComplianceSummariesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworkComplianceSummaries( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse - ]>; - listFrameworkComplianceSummaries( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>): void; - listFrameworkComplianceSummaries( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>): void; - listFrameworkComplianceSummaries( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFrameworkComplianceSummaries values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listFrameworkComplianceSummaries request %j', request); - return this.innerApiCalls - .listFrameworkComplianceSummaries(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesResponse - ]) => { - this._log.info('listFrameworkComplianceSummaries values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listFrameworkComplianceSummaries`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework compliance summary. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] - * Optional. Specifies the level of detail to return in the response. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary|FrameworkComplianceSummary} 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 `listFrameworkComplianceSummariesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFrameworkComplianceSummariesStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworkComplianceSummaries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworkComplianceSummaries stream %j', request); - return this.descriptors.page.listFrameworkComplianceSummaries.createStream( - this.innerApiCalls.listFrameworkComplianceSummaries as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFrameworkComplianceSummaries`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework compliance summary. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] - * Optional. Specifies the level of detail to return in the response. - * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary|FrameworkComplianceSummary}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/monitoring.list_framework_compliance_summaries.js - * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_async - */ - listFrameworkComplianceSummariesAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFrameworkComplianceSummariesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFrameworkComplianceSummaries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFrameworkComplianceSummaries iterate %j', request); - return this.descriptors.page.listFrameworkComplianceSummaries.asyncIterate( - this.innerApiCalls['listFrameworkComplianceSummaries'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists the finding summary by category for a given scope. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework overview page. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {google.protobuf.Timestamp} [request.endTime] - * Optional. The end time of the finding summary. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary|FindingSummary}. - * 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 `listFindingSummariesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFindingSummaries( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse - ]>; - listFindingSummaries( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>): void; - listFindingSummaries( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>): void; - listFindingSummaries( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFindingSummaries values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listFindingSummaries request %j', request); - return this.innerApiCalls - .listFindingSummaries(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesResponse - ]) => { - this._log.info('listFindingSummaries values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listFindingSummaries`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework overview page. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {google.protobuf.Timestamp} [request.endTime] - * Optional. The end time of the finding summary. - * @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 {@link protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary|FindingSummary} 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 `listFindingSummariesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listFindingSummariesStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFindingSummaries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFindingSummaries stream %j', request); - return this.descriptors.page.listFindingSummaries.createStream( - this.innerApiCalls.listFindingSummaries as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFindingSummaries`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework overview page. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {google.protobuf.Timestamp} [request.endTime] - * Optional. The end time of the finding summary. - * @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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary|FindingSummary}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/monitoring.list_finding_summaries.js - * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_async - */ - listFindingSummariesAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListFindingSummariesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFindingSummaries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFindingSummaries iterate %j', request); - return this.descriptors.page.listFindingSummaries.asyncIterate( - this.innerApiCalls['listFindingSummaries'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists the control compliance summary for a given scope. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework overview page. - * @param {google.protobuf.Timestamp} [request.endTime] - * Optional. The end time of the control compliance summary. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary|ControlComplianceSummary}. - * 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 `listControlComplianceSummariesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listControlComplianceSummaries( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse - ]>; - listControlComplianceSummaries( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>): void; - listControlComplianceSummaries( - request: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - callback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>): void; - listControlComplianceSummaries( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>, - callback?: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>): - Promise<[ - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: PaginationCallback< - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse|null|undefined, - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listControlComplianceSummaries values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listControlComplianceSummaries request %j', request); - return this.innerApiCalls - .listControlComplianceSummaries(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[], - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest|null, - protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesResponse - ]) => { - this._log.info('listControlComplianceSummaries values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listControlComplianceSummaries`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework overview page. - * @param {google.protobuf.Timestamp} [request.endTime] - * Optional. The end time of the control compliance summary. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary|ControlComplianceSummary} 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 `listControlComplianceSummariesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listControlComplianceSummariesStream( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listControlComplianceSummaries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listControlComplianceSummaries stream %j', request); - return this.descriptors.page.listControlComplianceSummaries.createStream( - this.innerApiCalls.listControlComplianceSummaries as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listControlComplianceSummaries`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent scope for the framework overview page. - * @param {google.protobuf.Timestamp} [request.endTime] - * Optional. The end time of the control compliance summary. - * @param {number} [request.pageSize] - * Optional. The requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token that identifies the page of results that the server - * should return. - * @param {string} [request.filter] - * Optional. The filtering results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary|ControlComplianceSummary}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/monitoring.list_control_compliance_summaries.js - * region_tag:cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_async - */ - listControlComplianceSummariesAsync( - request?: protos.google.cloud.cloudsecuritycompliance.v1.IListControlComplianceSummariesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listControlComplianceSummaries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listControlComplianceSummaries iterate %j', request); - return this.descriptors.page.listControlComplianceSummaries.asyncIterate( - this.innerApiCalls['listControlComplianceSummaries'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * 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 -- - // -------------------- - - /** - * Return a fully-qualified folderLocationFindingSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - folderLocationFindingSummariesPath(folder:string,location:string,findingSummary:string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.render({ - folder: folder, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the folder from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from FolderLocationFindingSummaries resource. - * - * @param {string} folderLocationFindingSummariesName - * A fully-qualified path representing folder_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromFolderLocationFindingSummariesName(folderLocationFindingSummariesName: string) { - return this.pathTemplates.folderLocationFindingSummariesPathTemplate.match(folderLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportControlComplianceSummariesPath(folder:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from FolderLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing folder_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(folderLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceReports resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceReportsPath(folder:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from FolderLocationFrameworkComplianceReports resource. - * - * @param {string} folderLocationFrameworkComplianceReportsName - * A fully-qualified path representing folder_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(folderLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match(folderLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified folderLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - folderLocationFrameworkComplianceSummariesPath(folder:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render({ - folder: folder, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the folder from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).folder; - } - - /** - * Parse the location from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from FolderLocationFrameworkComplianceSummaries resource. - * - * @param {string} folderLocationFrameworkComplianceSummariesName - * A fully-qualified path representing folder_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(folderLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match(folderLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * 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 organizationLocationCloudControlDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. - * - * @param {string} organizationLocationCloudControlDeploymentsName - * A fully-qualified path representing organization_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified organizationLocationCloudControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from OrganizationLocationCloudControls resource. - * - * @param {string} organizationLocationCloudControlsName - * A fully-qualified path representing organization_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { - return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified organizationLocationCmEnrollment resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationCmEnrollmentPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).organization; - } - - /** - * Parse the location from OrganizationLocationCmEnrollment resource. - * - * @param {string} organizationLocationCmEnrollmentName - * A fully-qualified path representing organization_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationCmEnrollmentName(organizationLocationCmEnrollmentName: string) { - return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified organizationLocationControls resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - organizationLocationControlsPath(organization:string,location:string,control:string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.render({ - organization: organization, - location: location, - control: control, - }); - } - - /** - * Parse the organization from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; - } - - /** - * Parse the location from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; - } - - /** - * Parse the control from OrganizationLocationControls resource. - * - * @param {string} organizationLocationControlsName - * A fully-qualified path representing organization_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { - return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; - } - - /** - * Return a fully-qualified organizationLocationFindingSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - organizationLocationFindingSummariesPath(organization:string,location:string,findingSummary:string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.render({ - organization: organization, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from OrganizationLocationFindingSummaries resource. - * - * @param {string} organizationLocationFindingSummariesName - * A fully-qualified path representing organization_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromOrganizationLocationFindingSummariesName(organizationLocationFindingSummariesName: string) { - return this.pathTemplates.organizationLocationFindingSummariesPathTemplate.match(organizationLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditScopeReportsPath(organization:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render({ - organization: organization, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from OrganizationLocationFrameworkAuditScopeReports resource. - * - * @param {string} organizationLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing organization_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(organizationLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match(organizationLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified organizationLocationFrameworkAudits resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - organizationLocationFrameworkAuditsPath(organization:string,location:string,frameworkAudit:string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render({ - organization: organization, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from OrganizationLocationFrameworkAudits resource. - * - * @param {string} organizationLocationFrameworkAuditsName - * A fully-qualified path representing organization_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(organizationLocationFrameworkAuditsName: string) { - return this.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match(organizationLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportControlComplianceSummariesPath(organization:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from OrganizationLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing organization_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(organizationLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceReports resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceReportsPath(organization:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from OrganizationLocationFrameworkComplianceReports resource. - * - * @param {string} organizationLocationFrameworkComplianceReportsName - * A fully-qualified path representing organization_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(organizationLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match(organizationLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified organizationLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - organizationLocationFrameworkComplianceSummariesPath(organization:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render({ - organization: organization, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from OrganizationLocationFrameworkComplianceSummaries resource. - * - * @param {string} organizationLocationFrameworkComplianceSummariesName - * A fully-qualified path representing organization_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(organizationLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ - organization: organization, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. - * - * @param {string} organizationLocationFrameworkDeploymentsName - * A fully-qualified path representing organization_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified organizationLocationFrameworks resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - organizationLocationFrameworksPath(organization:string,location:string,framework:string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ - organization: organization, - location: location, - framework: framework, - }); - } - - /** - * Parse the organization from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; - } - - /** - * Parse the location from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; - } - - /** - * Parse the framework from OrganizationLocationFrameworks resource. - * - * @param {string} organizationLocationFrameworksName - * A fully-qualified path representing organization_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { - return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified projectLocationCloudControlDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ - project: project, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the project from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; - } - - /** - * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. - * - * @param {string} projectLocationCloudControlDeploymentsName - * A fully-qualified path representing project_location_cloudControlDeployments resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { - return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; - } - - /** - * Return a fully-qualified projectLocationCloudControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ - project: project, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the project from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; - } - - /** - * Parse the location from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; - } - - /** - * Parse the cloud_control from ProjectLocationCloudControls resource. - * - * @param {string} projectLocationCloudControlsName - * A fully-qualified path representing project_location_cloudControls resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { - return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; - } - - /** - * Return a fully-qualified projectLocationCmEnrollment resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - projectLocationCmEnrollmentPath(project:string,location:string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).project; - } - - /** - * Parse the location from ProjectLocationCmEnrollment resource. - * - * @param {string} projectLocationCmEnrollmentName - * A fully-qualified path representing project_location_cmEnrollment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationCmEnrollmentName(projectLocationCmEnrollmentName: string) { - return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; - } - - /** - * Return a fully-qualified projectLocationControls resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} control - * @returns {string} Resource name string. - */ - projectLocationControlsPath(project:string,location:string,control:string) { - return this.pathTemplates.projectLocationControlsPathTemplate.render({ - project: project, - location: location, - control: control, - }); - } - - /** - * Parse the project from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; - } - - /** - * Parse the location from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; - } - - /** - * Parse the control from ProjectLocationControls resource. - * - * @param {string} projectLocationControlsName - * A fully-qualified path representing project_location_controls resource. - * @returns {string} A string representing the control. - */ - matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { - return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; - } - - /** - * Return a fully-qualified projectLocationFindingSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} finding_summary - * @returns {string} Resource name string. - */ - projectLocationFindingSummariesPath(project:string,location:string,findingSummary:string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.render({ - project: project, - location: location, - finding_summary: findingSummary, - }); - } - - /** - * Parse the project from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).location; - } - - /** - * Parse the finding_summary from ProjectLocationFindingSummaries resource. - * - * @param {string} projectLocationFindingSummariesName - * A fully-qualified path representing project_location_findingSummaries resource. - * @returns {string} A string representing the finding_summary. - */ - matchFindingSummaryFromProjectLocationFindingSummariesName(projectLocationFindingSummariesName: string) { - return this.pathTemplates.projectLocationFindingSummariesPathTemplate.match(projectLocationFindingSummariesName).finding_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkAuditScopeReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} generate_framework_audit_scope_report_response - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditScopeReportsPath(project:string,location:string,generateFrameworkAuditScopeReportResponse:string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render({ - project: project, - location: location, - generate_framework_audit_scope_report_response: generateFrameworkAuditScopeReportResponse, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).location; - } - - /** - * Parse the generate_framework_audit_scope_report_response from ProjectLocationFrameworkAuditScopeReports resource. - * - * @param {string} projectLocationFrameworkAuditScopeReportsName - * A fully-qualified path representing project_location_frameworkAuditScopeReports resource. - * @returns {string} A string representing the generate_framework_audit_scope_report_response. - */ - matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(projectLocationFrameworkAuditScopeReportsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match(projectLocationFrameworkAuditScopeReportsName).generate_framework_audit_scope_report_response; - } - - /** - * Return a fully-qualified projectLocationFrameworkAudits resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_audit - * @returns {string} Resource name string. - */ - projectLocationFrameworkAuditsPath(project:string,location:string,frameworkAudit:string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render({ - project: project, - location: location, - framework_audit: frameworkAudit, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).location; - } - - /** - * Parse the framework_audit from ProjectLocationFrameworkAudits resource. - * - * @param {string} projectLocationFrameworkAuditsName - * A fully-qualified path representing project_location_frameworkAudits resource. - * @returns {string} A string representing the framework_audit. - */ - matchFrameworkAuditFromProjectLocationFrameworkAuditsName(projectLocationFrameworkAuditsName: string) { - return this.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match(projectLocationFrameworkAuditsName).framework_audit; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReportControlComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @param {string} control_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportControlComplianceSummariesPath(project:string,location:string,frameworkComplianceReport:string,controlComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - control_compliance_summary: controlComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).framework_compliance_report; - } - - /** - * Parse the control_compliance_summary from ProjectLocationFrameworkComplianceReportControlComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceReportControlComplianceSummariesName - * A fully-qualified path representing project_location_framework_compliance_report_controlComplianceSummaries resource. - * @returns {string} A string representing the control_compliance_summary. - */ - matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(projectLocationFrameworkComplianceReportControlComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceReportControlComplianceSummariesName).control_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceReports resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_report - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceReportsPath(project:string,location:string,frameworkComplianceReport:string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render({ - project: project, - location: location, - framework_compliance_report: frameworkComplianceReport, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).location; - } - - /** - * Parse the framework_compliance_report from ProjectLocationFrameworkComplianceReports resource. - * - * @param {string} projectLocationFrameworkComplianceReportsName - * A fully-qualified path representing project_location_frameworkComplianceReports resource. - * @returns {string} A string representing the framework_compliance_report. - */ - matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(projectLocationFrameworkComplianceReportsName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match(projectLocationFrameworkComplianceReportsName).framework_compliance_report; - } - - /** - * Return a fully-qualified projectLocationFrameworkComplianceSummaries resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_compliance_summary - * @returns {string} Resource name string. - */ - projectLocationFrameworkComplianceSummariesPath(project:string,location:string,frameworkComplianceSummary:string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render({ - project: project, - location: location, - framework_compliance_summary: frameworkComplianceSummary, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).location; - } - - /** - * Parse the framework_compliance_summary from ProjectLocationFrameworkComplianceSummaries resource. - * - * @param {string} projectLocationFrameworkComplianceSummariesName - * A fully-qualified path representing project_location_frameworkComplianceSummaries resource. - * @returns {string} A string representing the framework_compliance_summary. - */ - matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(projectLocationFrameworkComplianceSummariesName: string) { - return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; - } - - /** - * Return a fully-qualified projectLocationFrameworkDeployments resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework_deployment - * @returns {string} Resource name string. - */ - projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ - project: project, - location: location, - framework_deployment: frameworkDeployment, - }); - } - - /** - * Parse the project from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; - } - - /** - * Parse the location from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; - } - - /** - * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. - * - * @param {string} projectLocationFrameworkDeploymentsName - * A fully-qualified path representing project_location_frameworkDeployments resource. - * @returns {string} A string representing the framework_deployment. - */ - matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { - return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; - } - - /** - * Return a fully-qualified projectLocationFrameworks resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} framework - * @returns {string} Resource name string. - */ - projectLocationFrameworksPath(project:string,location:string,framework:string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ - project: project, - location: location, - framework: framework, - }); - } - - /** - * Parse the project from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; - } - - /** - * Parse the location from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; - } - - /** - * Parse the framework from ProjectLocationFrameworks resource. - * - * @param {string} projectLocationFrameworksName - * A fully-qualified path representing project_location_frameworks resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { - return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.monitoringStub && !this._terminated) { - return this.monitoringStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json deleted file mode 100644 index a68a224ef1d..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client_config.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "interfaces": { - "google.cloud.cloudsecuritycompliance.v1.Monitoring": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "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 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListFrameworkComplianceSummaries": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListFindingSummaries": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "FetchFrameworkComplianceReport": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListControlComplianceSummaries": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "AggregateFrameworkComplianceReport": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json deleted file mode 100644 index 465d3b67d8b..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/src/v1/monitoring_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/cloudsecuritycompliance/v1/audit.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/common.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/config.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto", - "../../protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto" -] diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 6fb1aa753fa..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 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 cloudsecuritycompliance = require('@google-cloud/cloudsecuritycompliance'); - -function main() { - const auditClient = new cloudsecuritycompliance.AuditClient(); - const cmEnrollmentServiceClient = new cloudsecuritycompliance.CmEnrollmentServiceClient(); - const configClient = new cloudsecuritycompliance.ConfigClient(); - const deploymentClient = new cloudsecuritycompliance.DeploymentClient(); - const monitoringClient = new cloudsecuritycompliance.MonitoringClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 960d47e3e54..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2026 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 {AuditClient, CmEnrollmentServiceClient, ConfigClient, DeploymentClient, MonitoringClient} from '@google-cloud/cloudsecuritycompliance'; - -// check that the client class type name can be used -function doStuffWithAuditClient(client: AuditClient) { - client.close(); -} -function doStuffWithCmEnrollmentServiceClient(client: CmEnrollmentServiceClient) { - client.close(); -} -function doStuffWithConfigClient(client: ConfigClient) { - client.close(); -} -function doStuffWithDeploymentClient(client: DeploymentClient) { - client.close(); -} -function doStuffWithMonitoringClient(client: MonitoringClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const auditClient = new AuditClient(); - doStuffWithAuditClient(auditClient); - // check that the client instance can be created - const cmEnrollmentServiceClient = new CmEnrollmentServiceClient(); - doStuffWithCmEnrollmentServiceClient(cmEnrollmentServiceClient); - // check that the client instance can be created - const configClient = new ConfigClient(); - doStuffWithConfigClient(configClient); - // check that the client instance can be created - const deploymentClient = new DeploymentClient(); - doStuffWithDeploymentClient(deploymentClient); - // check that the client instance can be created - const monitoringClient = new MonitoringClient(); - doStuffWithMonitoringClient(monitoringClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts deleted file mode 100644 index f66069aa394..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts deleted file mode 100644 index 731fc0c5c8c..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts +++ /dev/null @@ -1,2680 +0,0 @@ -// Copyright 2026 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 auditModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, 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) - .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.AuditClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new auditModule.v1.AuditClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new auditModule.v1.AuditClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = auditModule.v1.AuditClient.servicePath; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = auditModule.v1.AuditClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new auditModule.v1.AuditClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new auditModule.v1.AuditClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new auditModule.v1.AuditClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new auditModule.v1.AuditClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new auditModule.v1.AuditClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = auditModule.v1.AuditClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new auditModule.v1.AuditClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new auditModule.v1.AuditClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.auditStub, undefined); - await client.initialize(); - assert(client.auditStub); - }); - - it('has close method for the initialized client', done => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.auditStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.auditStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new auditModule.v1.AuditClient({ - 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 auditModule.v1.AuditClient({ - 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('generateFrameworkAuditScopeReport', () => { - it('invokes generateFrameworkAuditScopeReport without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); - request.scope = defaultValue1; - const expectedHeaderRequestParams = `scope=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse() - ); - client.innerApiCalls.generateFrameworkAuditScopeReport = stubSimpleCall(expectedResponse); - const [response] = await client.generateFrameworkAuditScopeReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateFrameworkAuditScopeReport without error using callback', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); - request.scope = defaultValue1; - const expectedHeaderRequestParams = `scope=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse() - ); - client.innerApiCalls.generateFrameworkAuditScopeReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.generateFrameworkAuditScopeReport( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IGenerateFrameworkAuditScopeReportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateFrameworkAuditScopeReport with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); - request.scope = defaultValue1; - const expectedHeaderRequestParams = `scope=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.generateFrameworkAuditScopeReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.generateFrameworkAuditScopeReport(request), expectedError); - const actualRequest = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateFrameworkAuditScopeReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateFrameworkAuditScopeReport with closed client', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest', ['scope']); - request.scope = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.generateFrameworkAuditScopeReport(request), expectedError); - }); - }); - - describe('getFrameworkAudit', () => { - it('invokes getFrameworkAudit without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit() - ); - client.innerApiCalls.getFrameworkAudit = stubSimpleCall(expectedResponse); - const [response] = await client.getFrameworkAudit(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFrameworkAudit as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkAudit as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFrameworkAudit without error using callback', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit() - ); - client.innerApiCalls.getFrameworkAudit = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getFrameworkAudit( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFrameworkAudit as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkAudit as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFrameworkAudit with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getFrameworkAudit = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getFrameworkAudit(request), expectedError); - const actualRequest = (client.innerApiCalls.getFrameworkAudit as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkAudit as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFrameworkAudit with closed client', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getFrameworkAudit(request), expectedError); - }); - }); - - describe('createFrameworkAudit', () => { - it('invokes createFrameworkAudit without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createFrameworkAudit = stubLongRunningCall(expectedResponse); - const [operation] = await client.createFrameworkAudit(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFrameworkAudit without error using callback', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createFrameworkAudit = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createFrameworkAudit( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFrameworkAudit with call error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createFrameworkAudit = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createFrameworkAudit(request), expectedError); - const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFrameworkAudit with LRO error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createFrameworkAudit = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createFrameworkAudit(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkAudit as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateFrameworkAuditProgress without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkCreateFrameworkAuditProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateFrameworkAuditProgress with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateFrameworkAuditProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listFrameworkAudits', () => { - it('invokes listFrameworkAudits without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - ]; - client.innerApiCalls.listFrameworkAudits = stubSimpleCall(expectedResponse); - const [response] = await client.listFrameworkAudits(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworkAudits as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkAudits as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkAudits without error using callback', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - ]; - client.innerApiCalls.listFrameworkAudits = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listFrameworkAudits( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworkAudits as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkAudits as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkAudits with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listFrameworkAudits = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFrameworkAudits(request), expectedError); - const actualRequest = (client.innerApiCalls.listFrameworkAudits as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkAudits as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkAuditsStream without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - ]; - client.descriptors.page.listFrameworkAudits.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFrameworkAuditsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) => { - 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.listFrameworkAudits.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworkAudits, request)); - assert( - (client.descriptors.page.listFrameworkAudits.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listFrameworkAuditsStream with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworkAudits.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFrameworkAuditsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFrameworkAudits.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworkAudits, request)); - assert( - (client.descriptors.page.listFrameworkAudits.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworkAudits without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit()), - ]; - client.descriptors.page.listFrameworkAudits.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[] = []; - const iterable = client.listFrameworkAuditsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworkAudits with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworkAudits.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFrameworkAuditsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkAudit[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworkAudits.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.IOperation[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.IOperation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('folderLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFindingSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFindingSummariesPath', () => { - const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFindingSummariesName', () => { - const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFindingSummariesName', () => { - const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportsPath', () => { - const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', async () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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('organizationLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlDeploymentsPath', () => { - const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControls', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlsPath', () => { - const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { - const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/organizationLocationCmEnrollment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCmEnrollmentPath', () => { - const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationControls', async () => { - const fakePath = "/rendered/path/organizationLocationControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - control: "controlValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationControlsPath', () => { - const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationControlsName', () => { - const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromOrganizationLocationControlsName', () => { - const result = client.matchControlFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFindingSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFindingSummariesPath', () => { - const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditScopeReportsPath', () => { - const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditsPath', () => { - const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportsPath', () => { - const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkDeploymentsPath', () => { - const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworks', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworks"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworksPath', () => { - const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworksName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworksName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromOrganizationLocationFrameworksName', () => { - const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', async () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlDeploymentsPath', () => { - const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControls', async () => { - const fakePath = "/rendered/path/projectLocationCloudControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlsPath', () => { - const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromProjectLocationCloudControlsName', () => { - const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/projectLocationCmEnrollment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCmEnrollmentPath', () => { - const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCmEnrollmentName', () => { - const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCmEnrollmentName', () => { - const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationControls', async () => { - const fakePath = "/rendered/path/projectLocationControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - control: "controlValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationControlsPath', () => { - const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationControlsName', () => { - const result = client.matchProjectFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationControlsName', () => { - const result = client.matchLocationFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromProjectLocationControlsName', () => { - const result = client.matchControlFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFindingSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFindingSummariesPath', () => { - const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFindingSummariesName', () => { - const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFindingSummariesName', () => { - const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditScopeReportsPath', () => { - const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAudits"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditsPath', () => { - const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportsPath', () => { - const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkDeploymentsPath', () => { - const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworks', async () => { - const fakePath = "/rendered/path/projectLocationFrameworks"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworksPath', () => { - const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworksName', () => { - const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworksName', () => { - const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromProjectLocationFrameworksName', () => { - const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts deleted file mode 100644 index 7a0c86fb914..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts +++ /dev/null @@ -1,1919 +0,0 @@ -// Copyright 2026 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 cmenrollmentserviceModule from '../src'; - -import {protobuf, 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) - .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 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.CmEnrollmentServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = cmenrollmentserviceModule.v1.CmEnrollmentServiceClient.servicePath; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = cmenrollmentserviceModule.v1.CmEnrollmentServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = cmenrollmentserviceModule.v1.CmEnrollmentServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cmEnrollmentServiceStub, undefined); - await client.initialize(); - assert(client.cmEnrollmentServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.cmEnrollmentServiceStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cmEnrollmentServiceStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - 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('updateCmEnrollment', () => { - it('invokes updateCmEnrollment without error', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() - ); - request.cmEnrollment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); - request.cmEnrollment.name = defaultValue1; - const expectedHeaderRequestParams = `cm_enrollment.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CmEnrollment() - ); - client.innerApiCalls.updateCmEnrollment = stubSimpleCall(expectedResponse); - const [response] = await client.updateCmEnrollment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCmEnrollment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCmEnrollment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCmEnrollment without error using callback', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() - ); - request.cmEnrollment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); - request.cmEnrollment.name = defaultValue1; - const expectedHeaderRequestParams = `cm_enrollment.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CmEnrollment() - ); - client.innerApiCalls.updateCmEnrollment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateCmEnrollment( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICmEnrollment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCmEnrollment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCmEnrollment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCmEnrollment with error', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() - ); - request.cmEnrollment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); - request.cmEnrollment.name = defaultValue1; - const expectedHeaderRequestParams = `cm_enrollment.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateCmEnrollment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateCmEnrollment(request), expectedError); - const actualRequest = (client.innerApiCalls.updateCmEnrollment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCmEnrollment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCmEnrollment with closed client', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest() - ); - request.cmEnrollment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest', ['cmEnrollment', 'name']); - request.cmEnrollment.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateCmEnrollment(request), expectedError); - }); - }); - - describe('calculateEffectiveCmEnrollment', () => { - it('invokes calculateEffectiveCmEnrollment without error', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse() - ); - client.innerApiCalls.calculateEffectiveCmEnrollment = stubSimpleCall(expectedResponse); - const [response] = await client.calculateEffectiveCmEnrollment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes calculateEffectiveCmEnrollment without error using callback', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentResponse() - ); - client.innerApiCalls.calculateEffectiveCmEnrollment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.calculateEffectiveCmEnrollment( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICalculateEffectiveCmEnrollmentResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes calculateEffectiveCmEnrollment with error', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.calculateEffectiveCmEnrollment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.calculateEffectiveCmEnrollment(request), expectedError); - const actualRequest = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.calculateEffectiveCmEnrollment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes calculateEffectiveCmEnrollment with closed client', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CalculateEffectiveCmEnrollmentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.calculateEffectiveCmEnrollment(request), expectedError); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('folderLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFindingSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFindingSummariesPath', () => { - const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFindingSummariesName', () => { - const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFindingSummariesName', () => { - const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportsPath', () => { - const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlDeploymentsPath', () => { - const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControls', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlsPath', () => { - const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { - const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/organizationLocationCmEnrollment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCmEnrollmentPath', () => { - const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationControls', async () => { - const fakePath = "/rendered/path/organizationLocationControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - control: "controlValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationControlsPath', () => { - const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationControlsName', () => { - const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromOrganizationLocationControlsName', () => { - const result = client.matchControlFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFindingSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFindingSummariesPath', () => { - const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditScopeReportsPath', () => { - const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditsPath', () => { - const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportsPath', () => { - const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkDeploymentsPath', () => { - const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworks', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworks"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworksPath', () => { - const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworksName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworksName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromOrganizationLocationFrameworksName', () => { - const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlDeploymentsPath', () => { - const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControls', async () => { - const fakePath = "/rendered/path/projectLocationCloudControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlsPath', () => { - const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromProjectLocationCloudControlsName', () => { - const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/projectLocationCmEnrollment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCmEnrollmentPath', () => { - const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCmEnrollmentName', () => { - const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCmEnrollmentName', () => { - const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationControls', async () => { - const fakePath = "/rendered/path/projectLocationControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - control: "controlValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationControlsPath', () => { - const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationControlsName', () => { - const result = client.matchProjectFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationControlsName', () => { - const result = client.matchLocationFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromProjectLocationControlsName', () => { - const result = client.matchControlFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFindingSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFindingSummariesPath', () => { - const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFindingSummariesName', () => { - const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFindingSummariesName', () => { - const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditScopeReportsPath', () => { - const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAudits"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditsPath', () => { - const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportsPath', () => { - const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkDeploymentsPath', () => { - const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworks', async () => { - const fakePath = "/rendered/path/projectLocationFrameworks"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworksPath', () => { - const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworksName', () => { - const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworksName', () => { - const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromProjectLocationFrameworksName', () => { - const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts deleted file mode 100644 index cdad6d13971..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts +++ /dev/null @@ -1,3156 +0,0 @@ -// Copyright 2026 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 configModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, 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) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.ConfigClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new configModule.v1.ConfigClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new configModule.v1.ConfigClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = configModule.v1.ConfigClient.servicePath; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = configModule.v1.ConfigClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new configModule.v1.ConfigClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new configModule.v1.ConfigClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new configModule.v1.ConfigClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new configModule.v1.ConfigClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new configModule.v1.ConfigClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = configModule.v1.ConfigClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new configModule.v1.ConfigClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new configModule.v1.ConfigClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.configStub, undefined); - await client.initialize(); - assert(client.configStub); - }); - - it('has close method for the initialized client', done => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.configStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.configStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new configModule.v1.ConfigClient({ - 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 configModule.v1.ConfigClient({ - 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('getFramework', () => { - it('invokes getFramework without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.Framework() - ); - client.innerApiCalls.getFramework = stubSimpleCall(expectedResponse); - const [response] = await client.getFramework(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFramework without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.Framework() - ); - client.innerApiCalls.getFramework = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getFramework( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFramework with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getFramework = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getFramework(request), expectedError); - const actualRequest = (client.innerApiCalls.getFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFramework with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getFramework(request), expectedError); - }); - }); - - describe('createFramework', () => { - it('invokes createFramework without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.Framework() - ); - client.innerApiCalls.createFramework = stubSimpleCall(expectedResponse); - const [response] = await client.createFramework(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFramework without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.Framework() - ); - client.innerApiCalls.createFramework = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createFramework( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFramework with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createFramework = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createFramework(request), expectedError); - const actualRequest = (client.innerApiCalls.createFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFramework with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.createFramework(request), expectedError); - }); - }); - - describe('updateFramework', () => { - it('invokes updateFramework without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() - ); - request.framework ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); - request.framework.name = defaultValue1; - const expectedHeaderRequestParams = `framework.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.Framework() - ); - client.innerApiCalls.updateFramework = stubSimpleCall(expectedResponse); - const [response] = await client.updateFramework(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateFramework without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() - ); - request.framework ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); - request.framework.name = defaultValue1; - const expectedHeaderRequestParams = `framework.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.Framework() - ); - client.innerApiCalls.updateFramework = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateFramework( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateFramework with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() - ); - request.framework ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); - request.framework.name = defaultValue1; - const expectedHeaderRequestParams = `framework.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateFramework = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateFramework(request), expectedError); - const actualRequest = (client.innerApiCalls.updateFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateFramework with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest() - ); - request.framework ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest', ['framework', 'name']); - request.framework.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateFramework(request), expectedError); - }); - }); - - describe('deleteFramework', () => { - it('invokes deleteFramework without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteFramework = stubSimpleCall(expectedResponse); - const [response] = await client.deleteFramework(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFramework without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteFramework = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteFramework( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFramework with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteFramework = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteFramework(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteFramework as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFramework as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFramework with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.deleteFramework(request), expectedError); - }); - }); - - describe('getCloudControl', () => { - it('invokes getCloudControl without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() - ); - client.innerApiCalls.getCloudControl = stubSimpleCall(expectedResponse); - const [response] = await client.getCloudControl(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCloudControl without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() - ); - client.innerApiCalls.getCloudControl = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getCloudControl( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCloudControl with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getCloudControl = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getCloudControl(request), expectedError); - const actualRequest = (client.innerApiCalls.getCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCloudControl with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getCloudControl(request), expectedError); - }); - }); - - describe('createCloudControl', () => { - it('invokes createCloudControl without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() - ); - client.innerApiCalls.createCloudControl = stubSimpleCall(expectedResponse); - const [response] = await client.createCloudControl(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCloudControl without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() - ); - client.innerApiCalls.createCloudControl = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createCloudControl( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCloudControl with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createCloudControl = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createCloudControl(request), expectedError); - const actualRequest = (client.innerApiCalls.createCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createCloudControl with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.createCloudControl(request), expectedError); - }); - }); - - describe('updateCloudControl', () => { - it('invokes updateCloudControl without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() - ); - request.cloudControl ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); - request.cloudControl.name = defaultValue1; - const expectedHeaderRequestParams = `cloud_control.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() - ); - client.innerApiCalls.updateCloudControl = stubSimpleCall(expectedResponse); - const [response] = await client.updateCloudControl(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCloudControl without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() - ); - request.cloudControl ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); - request.cloudControl.name = defaultValue1; - const expectedHeaderRequestParams = `cloud_control.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl() - ); - client.innerApiCalls.updateCloudControl = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateCloudControl( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCloudControl with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() - ); - request.cloudControl ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); - request.cloudControl.name = defaultValue1; - const expectedHeaderRequestParams = `cloud_control.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateCloudControl = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateCloudControl(request), expectedError); - const actualRequest = (client.innerApiCalls.updateCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateCloudControl with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest() - ); - request.cloudControl ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest', ['cloudControl', 'name']); - request.cloudControl.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.updateCloudControl(request), expectedError); - }); - }); - - describe('deleteCloudControl', () => { - it('invokes deleteCloudControl without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteCloudControl = stubSimpleCall(expectedResponse); - const [response] = await client.deleteCloudControl(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCloudControl without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteCloudControl = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteCloudControl( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCloudControl with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteCloudControl = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteCloudControl(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteCloudControl as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteCloudControl as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteCloudControl with closed client', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.deleteCloudControl(request), expectedError); - }); - }); - - describe('listFrameworks', () => { - it('invokes listFrameworks without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - ]; - client.innerApiCalls.listFrameworks = stubSimpleCall(expectedResponse); - const [response] = await client.listFrameworks(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworks without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - ]; - client.innerApiCalls.listFrameworks = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listFrameworks( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFramework[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworks with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listFrameworks = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFrameworks(request), expectedError); - const actualRequest = (client.innerApiCalls.listFrameworks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworksStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - ]; - client.descriptors.page.listFrameworks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFrameworksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.Framework[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.Framework) => { - 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.listFrameworks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworks, request)); - assert( - (client.descriptors.page.listFrameworks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listFrameworksStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFrameworksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.Framework[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.Framework) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFrameworks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworks, request)); - assert( - (client.descriptors.page.listFrameworks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworks without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.Framework()), - ]; - client.descriptors.page.listFrameworks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFramework[] = []; - const iterable = client.listFrameworksAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworks with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFrameworksAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFramework[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listCloudControls', () => { - it('invokes listCloudControls without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - ]; - client.innerApiCalls.listCloudControls = stubSimpleCall(expectedResponse); - const [response] = await client.listCloudControls(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listCloudControls as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCloudControls as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listCloudControls without error using callback', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - ]; - client.innerApiCalls.listCloudControls = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listCloudControls( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listCloudControls as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCloudControls as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listCloudControls with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listCloudControls = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listCloudControls(request), expectedError); - const actualRequest = (client.innerApiCalls.listCloudControls as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCloudControls as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listCloudControlsStream without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - ]; - client.descriptors.page.listCloudControls.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCloudControlsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl) => { - 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.listCloudControls.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listCloudControls, request)); - assert( - (client.descriptors.page.listCloudControls.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listCloudControlsStream with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listCloudControls.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listCloudControlsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControl) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listCloudControls.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listCloudControls, request)); - assert( - (client.descriptors.page.listCloudControls.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listCloudControls without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControl()), - ]; - client.descriptors.page.listCloudControls.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[] = []; - const iterable = client.listCloudControlsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listCloudControls with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listCloudControls.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listCloudControlsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControl[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listCloudControls.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('folderLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFindingSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFindingSummariesPath', () => { - const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFindingSummariesName', () => { - const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFindingSummariesName', () => { - const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportsPath', () => { - const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organization', async () => { - const fakePath = "/rendered/path/organization"; - const expectedParameters = { - organization: "organizationValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationPath', () => { - const result = client.organizationPath("organizationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationName', () => { - const result = client.matchOrganizationFromOrganizationName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocation', async () => { - const fakePath = "/rendered/path/organizationLocation"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationPath', () => { - const result = client.organizationLocationPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationName', () => { - const result = client.matchOrganizationFromOrganizationLocationName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationName', () => { - const result = client.matchLocationFromOrganizationLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlDeploymentsPath', () => { - const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControls', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlsPath', () => { - const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { - const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/organizationLocationCmEnrollment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCmEnrollmentPath', () => { - const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationControls', async () => { - const fakePath = "/rendered/path/organizationLocationControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - control: "controlValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationControlsPath', () => { - const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationControlsName', () => { - const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromOrganizationLocationControlsName', () => { - const result = client.matchControlFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFindingSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFindingSummariesPath', () => { - const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditScopeReportsPath', () => { - const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditsPath', () => { - const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportsPath', () => { - const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkDeploymentsPath', () => { - const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworks', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworks"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworksPath', () => { - const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworksName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworksName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromOrganizationLocationFrameworksName', () => { - const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlDeploymentsPath', () => { - const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControls', async () => { - const fakePath = "/rendered/path/projectLocationCloudControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlsPath', () => { - const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromProjectLocationCloudControlsName', () => { - const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/projectLocationCmEnrollment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCmEnrollmentPath', () => { - const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCmEnrollmentName', () => { - const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCmEnrollmentName', () => { - const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationControls', async () => { - const fakePath = "/rendered/path/projectLocationControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - control: "controlValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationControlsPath', () => { - const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationControlsName', () => { - const result = client.matchProjectFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationControlsName', () => { - const result = client.matchLocationFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromProjectLocationControlsName', () => { - const result = client.matchControlFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFindingSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFindingSummariesPath', () => { - const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFindingSummariesName', () => { - const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFindingSummariesName', () => { - const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditScopeReportsPath', () => { - const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAudits"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditsPath', () => { - const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportsPath', () => { - const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkDeploymentsPath', () => { - const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworks', async () => { - const fakePath = "/rendered/path/projectLocationFrameworks"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworksPath', () => { - const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworksName', () => { - const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworksName', () => { - const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromProjectLocationFrameworksName', () => { - const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts deleted file mode 100644 index d3887b2ab37..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts +++ /dev/null @@ -1,3079 +0,0 @@ -// Copyright 2026 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 deploymentModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, 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) - .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.DeploymentClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new deploymentModule.v1.DeploymentClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new deploymentModule.v1.DeploymentClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = deploymentModule.v1.DeploymentClient.servicePath; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = deploymentModule.v1.DeploymentClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new deploymentModule.v1.DeploymentClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new deploymentModule.v1.DeploymentClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new deploymentModule.v1.DeploymentClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new deploymentModule.v1.DeploymentClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new deploymentModule.v1.DeploymentClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = deploymentModule.v1.DeploymentClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new deploymentModule.v1.DeploymentClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new deploymentModule.v1.DeploymentClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.deploymentStub, undefined); - await client.initialize(); - assert(client.deploymentStub); - }); - - it('has close method for the initialized client', done => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.deploymentStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.deploymentStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new deploymentModule.v1.DeploymentClient({ - 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 deploymentModule.v1.DeploymentClient({ - 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('getFrameworkDeployment', () => { - it('invokes getFrameworkDeployment without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment() - ); - client.innerApiCalls.getFrameworkDeployment = stubSimpleCall(expectedResponse); - const [response] = await client.getFrameworkDeployment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFrameworkDeployment without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment() - ); - client.innerApiCalls.getFrameworkDeployment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getFrameworkDeployment( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFrameworkDeployment with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getFrameworkDeployment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getFrameworkDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.getFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getFrameworkDeployment with closed client', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getFrameworkDeployment(request), expectedError); - }); - }); - - describe('getCloudControlDeployment', () => { - it('invokes getCloudControlDeployment without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment() - ); - client.innerApiCalls.getCloudControlDeployment = stubSimpleCall(expectedResponse); - const [response] = await client.getCloudControlDeployment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCloudControlDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCloudControlDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCloudControlDeployment without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment() - ); - client.innerApiCalls.getCloudControlDeployment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getCloudControlDeployment( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getCloudControlDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCloudControlDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCloudControlDeployment with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getCloudControlDeployment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getCloudControlDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.getCloudControlDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getCloudControlDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getCloudControlDeployment with closed client', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getCloudControlDeployment(request), expectedError); - }); - }); - - describe('createFrameworkDeployment', () => { - it('invokes createFrameworkDeployment without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createFrameworkDeployment = stubLongRunningCall(expectedResponse); - const [operation] = await client.createFrameworkDeployment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFrameworkDeployment without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createFrameworkDeployment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createFrameworkDeployment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFrameworkDeployment with call error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createFrameworkDeployment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createFrameworkDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createFrameworkDeployment with LRO error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createFrameworkDeployment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createFrameworkDeployment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateFrameworkDeploymentProgress without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkCreateFrameworkDeploymentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateFrameworkDeploymentProgress with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateFrameworkDeploymentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteFrameworkDeployment', () => { - it('invokes deleteFrameworkDeployment without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteFrameworkDeployment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFrameworkDeployment without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteFrameworkDeployment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFrameworkDeployment with call error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteFrameworkDeployment(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteFrameworkDeployment with LRO error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteFrameworkDeployment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteFrameworkDeployment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFrameworkDeployment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteFrameworkDeploymentProgress without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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.checkDeleteFrameworkDeploymentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteFrameworkDeploymentProgress with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteFrameworkDeploymentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listFrameworkDeployments', () => { - it('invokes listFrameworkDeployments without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - ]; - client.innerApiCalls.listFrameworkDeployments = stubSimpleCall(expectedResponse); - const [response] = await client.listFrameworkDeployments(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworkDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkDeployments without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - ]; - client.innerApiCalls.listFrameworkDeployments = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listFrameworkDeployments( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworkDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkDeployments with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listFrameworkDeployments = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFrameworkDeployments(request), expectedError); - const actualRequest = (client.innerApiCalls.listFrameworkDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkDeploymentsStream without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - ]; - client.descriptors.page.listFrameworkDeployments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFrameworkDeploymentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => { - 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.listFrameworkDeployments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworkDeployments, request)); - assert( - (client.descriptors.page.listFrameworkDeployments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listFrameworkDeploymentsStream with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworkDeployments.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFrameworkDeploymentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFrameworkDeployments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworkDeployments, request)); - assert( - (client.descriptors.page.listFrameworkDeployments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworkDeployments without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment()), - ]; - client.descriptors.page.listFrameworkDeployments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[] = []; - const iterable = client.listFrameworkDeploymentsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworkDeployments with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworkDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFrameworkDeploymentsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkDeployment[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworkDeployments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listCloudControlDeployments', () => { - it('invokes listCloudControlDeployments without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - ]; - client.innerApiCalls.listCloudControlDeployments = stubSimpleCall(expectedResponse); - const [response] = await client.listCloudControlDeployments(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listCloudControlDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCloudControlDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listCloudControlDeployments without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - ]; - client.innerApiCalls.listCloudControlDeployments = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listCloudControlDeployments( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listCloudControlDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCloudControlDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listCloudControlDeployments with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listCloudControlDeployments = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listCloudControlDeployments(request), expectedError); - const actualRequest = (client.innerApiCalls.listCloudControlDeployments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listCloudControlDeployments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listCloudControlDeploymentsStream without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - ]; - client.descriptors.page.listCloudControlDeployments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCloudControlDeploymentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => { - 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.listCloudControlDeployments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listCloudControlDeployments, request)); - assert( - (client.descriptors.page.listCloudControlDeployments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listCloudControlDeploymentsStream with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listCloudControlDeployments.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listCloudControlDeploymentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listCloudControlDeployments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listCloudControlDeployments, request)); - assert( - (client.descriptors.page.listCloudControlDeployments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listCloudControlDeployments without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment()), - ]; - client.descriptors.page.listCloudControlDeployments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[] = []; - const iterable = client.listCloudControlDeploymentsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listCloudControlDeployments with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listCloudControlDeployments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listCloudControlDeploymentsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.ICloudControlDeployment[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listCloudControlDeployments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }).catch(err => {throw err}); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.IOperation[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.IOperation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('folderLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFindingSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFindingSummariesPath', () => { - const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFindingSummariesName', () => { - const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFindingSummariesName', () => { - const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportsPath', () => { - const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organization', async () => { - const fakePath = "/rendered/path/organization"; - const expectedParameters = { - organization: "organizationValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationPath', () => { - const result = client.organizationPath("organizationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationName', () => { - const result = client.matchOrganizationFromOrganizationName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocation', async () => { - const fakePath = "/rendered/path/organizationLocation"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationPath', () => { - const result = client.organizationLocationPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationName', () => { - const result = client.matchOrganizationFromOrganizationLocationName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationName', () => { - const result = client.matchLocationFromOrganizationLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlDeploymentsPath', () => { - const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControls', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlsPath', () => { - const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { - const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/organizationLocationCmEnrollment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCmEnrollmentPath', () => { - const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationControls', async () => { - const fakePath = "/rendered/path/organizationLocationControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - control: "controlValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationControlsPath', () => { - const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationControlsName', () => { - const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromOrganizationLocationControlsName', () => { - const result = client.matchControlFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFindingSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFindingSummariesPath', () => { - const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditScopeReportsPath', () => { - const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditsPath', () => { - const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportsPath', () => { - const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkDeploymentsPath', () => { - const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworks', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworks"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworksPath', () => { - const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworksName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworksName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromOrganizationLocationFrameworksName', () => { - const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlDeploymentsPath', () => { - const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControls', async () => { - const fakePath = "/rendered/path/projectLocationCloudControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlsPath', () => { - const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromProjectLocationCloudControlsName', () => { - const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/projectLocationCmEnrollment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCmEnrollmentPath', () => { - const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCmEnrollmentName', () => { - const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCmEnrollmentName', () => { - const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationControls', async () => { - const fakePath = "/rendered/path/projectLocationControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - control: "controlValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationControlsPath', () => { - const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationControlsName', () => { - const result = client.matchProjectFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationControlsName', () => { - const result = client.matchLocationFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromProjectLocationControlsName', () => { - const result = client.matchControlFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFindingSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFindingSummariesPath', () => { - const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFindingSummariesName', () => { - const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFindingSummariesName', () => { - const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditScopeReportsPath', () => { - const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAudits"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditsPath', () => { - const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportsPath', () => { - const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkDeploymentsPath', () => { - const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworks', async () => { - const fakePath = "/rendered/path/projectLocationFrameworks"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworksPath', () => { - const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworksName', () => { - const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworksName', () => { - const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromProjectLocationFrameworksName', () => { - const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts b/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts deleted file mode 100644 index 3e72919f304..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts +++ /dev/null @@ -1,2745 +0,0 @@ -// Copyright 2026 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 monitoringModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, 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) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.MonitoringClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new monitoringModule.v1.MonitoringClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new monitoringModule.v1.MonitoringClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = monitoringModule.v1.MonitoringClient.servicePath; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = monitoringModule.v1.MonitoringClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'cloudsecuritycompliance.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new monitoringModule.v1.MonitoringClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new monitoringModule.v1.MonitoringClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new monitoringModule.v1.MonitoringClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new monitoringModule.v1.MonitoringClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'cloudsecuritycompliance.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new monitoringModule.v1.MonitoringClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = monitoringModule.v1.MonitoringClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new monitoringModule.v1.MonitoringClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new monitoringModule.v1.MonitoringClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.monitoringStub, undefined); - await client.initialize(); - assert(client.monitoringStub); - }); - - it('has close method for the initialized client', done => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.monitoringStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.monitoringStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new monitoringModule.v1.MonitoringClient({ - 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 monitoringModule.v1.MonitoringClient({ - 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('fetchFrameworkComplianceReport', () => { - it('invokes fetchFrameworkComplianceReport without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport() - ); - client.innerApiCalls.fetchFrameworkComplianceReport = stubSimpleCall(expectedResponse); - const [response] = await client.fetchFrameworkComplianceReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchFrameworkComplianceReport without error using callback', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport() - ); - client.innerApiCalls.fetchFrameworkComplianceReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchFrameworkComplianceReport( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceReport|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchFrameworkComplianceReport with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchFrameworkComplianceReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchFrameworkComplianceReport(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchFrameworkComplianceReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchFrameworkComplianceReport with closed client', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.fetchFrameworkComplianceReport(request), expectedError); - }); - }); - - describe('aggregateFrameworkComplianceReport', () => { - it('invokes aggregateFrameworkComplianceReport without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse() - ); - client.innerApiCalls.aggregateFrameworkComplianceReport = stubSimpleCall(expectedResponse); - const [response] = await client.aggregateFrameworkComplianceReport(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes aggregateFrameworkComplianceReport without error using callback', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse() - ); - client.innerApiCalls.aggregateFrameworkComplianceReport = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.aggregateFrameworkComplianceReport( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IAggregateFrameworkComplianceReportResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes aggregateFrameworkComplianceReport with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.aggregateFrameworkComplianceReport = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.aggregateFrameworkComplianceReport(request), expectedError); - const actualRequest = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.aggregateFrameworkComplianceReport as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes aggregateFrameworkComplianceReport with closed client', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.aggregateFrameworkComplianceReport(request), expectedError); - }); - }); - - describe('listFrameworkComplianceSummaries', () => { - it('invokes listFrameworkComplianceSummaries without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - ]; - client.innerApiCalls.listFrameworkComplianceSummaries = stubSimpleCall(expectedResponse); - const [response] = await client.listFrameworkComplianceSummaries(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkComplianceSummaries without error using callback', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - ]; - client.innerApiCalls.listFrameworkComplianceSummaries = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listFrameworkComplianceSummaries( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkComplianceSummaries with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listFrameworkComplianceSummaries = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFrameworkComplianceSummaries(request), expectedError); - const actualRequest = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFrameworkComplianceSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFrameworkComplianceSummariesStream without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - ]; - client.descriptors.page.listFrameworkComplianceSummaries.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFrameworkComplianceSummariesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary) => { - 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.listFrameworkComplianceSummaries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworkComplianceSummaries, request)); - assert( - (client.descriptors.page.listFrameworkComplianceSummaries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listFrameworkComplianceSummariesStream with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworkComplianceSummaries.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFrameworkComplianceSummariesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFrameworkComplianceSummaries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFrameworkComplianceSummaries, request)); - assert( - (client.descriptors.page.listFrameworkComplianceSummaries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworkComplianceSummaries without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary()), - ]; - client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[] = []; - const iterable = client.listFrameworkComplianceSummariesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFrameworkComplianceSummaries with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFrameworkComplianceSummariesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFrameworkComplianceSummary[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFrameworkComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listFindingSummaries', () => { - it('invokes listFindingSummaries without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - ]; - client.innerApiCalls.listFindingSummaries = stubSimpleCall(expectedResponse); - const [response] = await client.listFindingSummaries(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFindingSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFindingSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFindingSummaries without error using callback', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - ]; - client.innerApiCalls.listFindingSummaries = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listFindingSummaries( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFindingSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFindingSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFindingSummaries with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listFindingSummaries = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFindingSummaries(request), expectedError); - const actualRequest = (client.innerApiCalls.listFindingSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFindingSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listFindingSummariesStream without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - ]; - client.descriptors.page.listFindingSummaries.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFindingSummariesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary) => { - 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.listFindingSummaries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFindingSummaries, request)); - assert( - (client.descriptors.page.listFindingSummaries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listFindingSummariesStream with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFindingSummaries.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFindingSummariesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFindingSummaries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFindingSummaries, request)); - assert( - (client.descriptors.page.listFindingSummaries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFindingSummaries without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.FindingSummary()), - ]; - client.descriptors.page.listFindingSummaries.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[] = []; - const iterable = client.listFindingSummariesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listFindingSummaries with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listFindingSummaries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFindingSummariesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IFindingSummary[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listFindingSummaries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listControlComplianceSummaries', () => { - it('invokes listControlComplianceSummaries without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - ]; - client.innerApiCalls.listControlComplianceSummaries = stubSimpleCall(expectedResponse); - const [response] = await client.listControlComplianceSummaries(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listControlComplianceSummaries without error using callback', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - ]; - client.innerApiCalls.listControlComplianceSummaries = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listControlComplianceSummaries( - request, - (err?: Error|null, result?: protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listControlComplianceSummaries with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listControlComplianceSummaries = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listControlComplianceSummaries(request), expectedError); - const actualRequest = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listControlComplianceSummaries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listControlComplianceSummariesStream without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - ]; - client.descriptors.page.listControlComplianceSummaries.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listControlComplianceSummariesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary) => { - 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.listControlComplianceSummaries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listControlComplianceSummaries, request)); - assert( - (client.descriptors.page.listControlComplianceSummaries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listControlComplianceSummariesStream with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listControlComplianceSummaries.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listControlComplianceSummariesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary[] = []; - stream.on('data', (response: protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listControlComplianceSummaries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listControlComplianceSummaries, request)); - assert( - (client.descriptors.page.listControlComplianceSummaries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listControlComplianceSummaries without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - generateSampleMessage(new protos.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary()), - ]; - client.descriptors.page.listControlComplianceSummaries.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[] = []; - const iterable = client.listControlComplianceSummariesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listControlComplianceSummaries with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listControlComplianceSummaries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listControlComplianceSummariesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.cloudsecuritycompliance.v1.IControlComplianceSummary[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listControlComplianceSummaries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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 monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('folderLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFindingSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFindingSummariesPath', () => { - const result = client.folderLocationFindingSummariesPath("folderValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFindingSummariesName', () => { - const result = client.matchFolderFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFindingSummariesName', () => { - const result = client.matchLocationFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromFolderLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromFolderLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.folderLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceReportControlComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromFolderLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceReports"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceReportsPath', () => { - const result = client.folderLocationFrameworkComplianceReportsPath("folderValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromFolderLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/folderLocationFrameworkComplianceSummaries"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationFrameworkComplianceSummariesPath', () => { - const result = client.folderLocationFrameworkComplianceSummariesPath("folderValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFolderFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromFolderLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.folderLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', async () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await 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('organizationLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlDeploymentsPath', () => { - const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCloudControls', async () => { - const fakePath = "/rendered/path/organizationLocationCloudControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCloudControlsPath', () => { - const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCloudControlsName', () => { - const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { - const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/organizationLocationCmEnrollment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationCmEnrollmentPath', () => { - const result = client.organizationLocationCmEnrollmentPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchOrganizationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationCmEnrollmentName', () => { - const result = client.matchLocationFromOrganizationLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationControls', async () => { - const fakePath = "/rendered/path/organizationLocationControls"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - control: "controlValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationControlsPath', () => { - const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationControlsName', () => { - const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationControlsName', () => { - const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromOrganizationLocationControlsName', () => { - const result = client.matchControlFromOrganizationLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFindingSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFindingSummariesPath', () => { - const result = client.organizationLocationFindingSummariesPath("organizationValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromOrganizationLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromOrganizationLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.organizationLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAuditScopeReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditScopeReportsPath', () => { - const result = client.organizationLocationFrameworkAuditScopeReportsPath("organizationValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromOrganizationLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkAudits"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkAuditsPath', () => { - const result = client.organizationLocationFrameworkAuditsPath("organizationValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromOrganizationLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.organizationLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceReportControlComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromOrganizationLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceReports"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceReportsPath', () => { - const result = client.organizationLocationFrameworkComplianceReportsPath("organizationValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromOrganizationLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkComplianceSummaries"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkComplianceSummariesPath', () => { - const result = client.organizationLocationFrameworkComplianceSummariesPath("organizationValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromOrganizationLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworkDeploymentsPath', () => { - const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationFrameworks', async () => { - const fakePath = "/rendered/path/organizationLocationFrameworks"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.organizationLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationFrameworksPath', () => { - const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationFrameworksName', () => { - const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationFrameworksName', () => { - const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromOrganizationLocationFrameworksName', () => { - const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', async () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControlDeployments', async () => { - const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlDeploymentsPath', () => { - const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { - const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCloudControls', async () => { - const fakePath = "/rendered/path/projectLocationCloudControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCloudControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCloudControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCloudControlsPath', () => { - const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCloudControlsName', () => { - const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCloudControlsName', () => { - const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromProjectLocationCloudControlsName', () => { - const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationCmEnrollment', async () => { - const fakePath = "/rendered/path/projectLocationCmEnrollment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationCmEnrollmentPath', () => { - const result = client.projectLocationCmEnrollmentPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationCmEnrollmentName', () => { - const result = client.matchProjectFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationCmEnrollmentName', () => { - const result = client.matchLocationFromProjectLocationCmEnrollmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationCmEnrollmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationControls', async () => { - const fakePath = "/rendered/path/projectLocationControls"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - control: "controlValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationControlsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationControlsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationControlsPath', () => { - const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationControlsName', () => { - const result = client.matchProjectFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationControlsName', () => { - const result = client.matchLocationFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlFromProjectLocationControlsName', () => { - const result = client.matchControlFromProjectLocationControlsName(fakePath); - assert.strictEqual(result, "controlValue"); - assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFindingSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFindingSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - finding_summary: "findingSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFindingSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFindingSummariesPath', () => { - const result = client.projectLocationFindingSummariesPath("projectValue", "locationValue", "findingSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFindingSummariesName', () => { - const result = client.matchProjectFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFindingSummariesName', () => { - const result = client.matchLocationFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingSummaryFromProjectLocationFindingSummariesName', () => { - const result = client.matchFindingSummaryFromProjectLocationFindingSummariesName(fakePath); - assert.strictEqual(result, "findingSummaryValue"); - assert((client.pathTemplates.projectLocationFindingSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAuditScopeReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAuditScopeReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - generate_framework_audit_scope_report_response: "generateFrameworkAuditScopeReportResponseValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditScopeReportsPath', () => { - const result = client.projectLocationFrameworkAuditScopeReportsPath("projectValue", "locationValue", "generateFrameworkAuditScopeReportResponseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName', () => { - const result = client.matchGenerateFrameworkAuditScopeReportResponseFromProjectLocationFrameworkAuditScopeReportsName(fakePath); - assert.strictEqual(result, "generateFrameworkAuditScopeReportResponseValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditScopeReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkAudits', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkAudits"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_audit: "frameworkAuditValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkAuditsPath', () => { - const result = client.projectLocationFrameworkAuditsPath("projectValue", "locationValue", "frameworkAuditValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkAuditFromProjectLocationFrameworkAuditsName', () => { - const result = client.matchFrameworkAuditFromProjectLocationFrameworkAuditsName(fakePath); - assert.strictEqual(result, "frameworkAuditValue"); - assert((client.pathTemplates.projectLocationFrameworkAuditsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReportControlComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReportControlComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - control_compliance_summary: "controlComplianceSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportControlComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceReportControlComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceReportValue", "controlComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName', () => { - const result = client.matchControlComplianceSummaryFromProjectLocationFrameworkComplianceReportControlComplianceSummariesName(fakePath); - assert.strictEqual(result, "controlComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportControlComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceReports', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceReports"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_report: "frameworkComplianceReportValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceReportsPath', () => { - const result = client.projectLocationFrameworkComplianceReportsPath("projectValue", "locationValue", "frameworkComplianceReportValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName', () => { - const result = client.matchFrameworkComplianceReportFromProjectLocationFrameworkComplianceReportsName(fakePath); - assert.strictEqual(result, "frameworkComplianceReportValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceReportsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkComplianceSummaries', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkComplianceSummaries"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_compliance_summary: "frameworkComplianceSummaryValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkComplianceSummariesPath', () => { - const result = client.projectLocationFrameworkComplianceSummariesPath("projectValue", "locationValue", "frameworkComplianceSummaryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchProjectFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchLocationFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName', () => { - const result = client.matchFrameworkComplianceSummaryFromProjectLocationFrameworkComplianceSummariesName(fakePath); - assert.strictEqual(result, "frameworkComplianceSummaryValue"); - assert((client.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworkDeployments', async () => { - const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework_deployment: "frameworkDeploymentValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworkDeploymentsPath', () => { - const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { - const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationFrameworks', async () => { - const fakePath = "/rendered/path/projectLocationFrameworks"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - framework: "frameworkValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.projectLocationFrameworksPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationFrameworksPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationFrameworksPath', () => { - const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationFrameworksName', () => { - const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationFrameworksName', () => { - const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromProjectLocationFrameworksName', () => { - const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json b/owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json deleted file mode 100644 index ca73e7bfc82..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2023", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts", - "src/**/*.json", - "samples/**/*.json", - "protos/protos.json" - ] -} diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js b/owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js deleted file mode 100644 index cfaffcbff19..00000000000 --- a/owl-bot-staging/google-cloud-cloudsecuritycompliance/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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: 'Audit', - filename: './audit.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-cloud-cloudsecuritycompliance/.eslintrc.json b/packages/google-cloud-cloudsecuritycompliance/.eslintrc.json index 78215349546..3e8d97ccb39 100644 --- a/packages/google-cloud-cloudsecuritycompliance/.eslintrc.json +++ b/packages/google-cloud-cloudsecuritycompliance/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "./node_modules/gts" + "extends": "./node_modules/gts", + "root": true } diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitattributes b/packages/google-cloud-cloudsecuritycompliance/.gitattributes similarity index 100% rename from owl-bot-staging/google-cloud-cloudsecuritycompliance/.gitattributes rename to packages/google-cloud-cloudsecuritycompliance/.gitattributes diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md b/packages/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md similarity index 100% rename from owl-bot-staging/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md rename to packages/google-cloud-cloudsecuritycompliance/CODE_OF_CONDUCT.md diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md b/packages/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md similarity index 100% rename from owl-bot-staging/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md rename to packages/google-cloud-cloudsecuritycompliance/CONTRIBUTING.md diff --git a/owl-bot-staging/google-cloud-cloudsecuritycompliance/LICENSE b/packages/google-cloud-cloudsecuritycompliance/LICENSE similarity index 100% rename from owl-bot-staging/google-cloud-cloudsecuritycompliance/LICENSE rename to packages/google-cloud-cloudsecuritycompliance/LICENSE diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto index 5622291469d..4f950a71499 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -132,6 +132,18 @@ enum CloudControlCategory { // The business continuity and disaster recovery (BCDR) category. CC_CATEGORY_BCDR = 15; + + // The admin access category. + CC_CATEGORY_ADMIN_ACCESS = 16; + + // DRZ (Data Residency). + CC_CATEGORY_DATA_RESIDENCY = 17; + + // RUR (Resource Usage Restriction). + CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18; + + // SERVICE SPECIFIC + CC_CATEGORY_SERVICE_SPECIFIC = 19; } // The cloud provider that's associated with the cloud control. @@ -240,6 +252,7 @@ message Framework { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/Framework" pattern: "organizations/{organization}/locations/{location}/frameworks/{framework}" + pattern: "projects/{project}/locations/{location}/frameworks/{framework}" plural: "frameworks" singular: "framework" }; @@ -256,8 +269,12 @@ message Framework { CUSTOM = 2; } - // Required. Identifier. The name of the framework, in the format - // `organizations/{organization}/locations/{location}/frameworks/{framework_id}`. + // Required. Identifier. The name of the framework, in one of the following + // formats: + // `organizations/{organization}/locations/{location}/frameworks/{framework}` + // or + // `projects/{project}/locations/{location}/frameworks/{framework}`. + // // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -303,8 +320,11 @@ message Framework { // The details of a cloud control. message CloudControlDetails { - // Required. The name of the cloud control, in the format - // `organizations/{organization}/locations/{location}/cloudControls/{cloud-control}`. + // Required. The name of the cloud control, in one of the following formats: + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + // or + // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + // // The only supported location is `global`. string name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -318,13 +338,20 @@ message CloudControlDetails { repeated Parameter parameters = 4 [(google.api.field_behavior) = OPTIONAL]; } -// The reference of a framework, in the format -// `organizations/{organization}/locations/{location}/frameworks/{framework}`. +// The reference of a framework, in one of the following formats: +// - `organizations/{organization}/locations/{location}/frameworks/{framework}` +// - `projects/{project}/locations/{location}/frameworks/{framework}`. +// // The only supported location is `global`. message FrameworkReference { // Required. The major version of the framework. If not specified, the version // corresponds to the latest version of the framework. - string framework = 1 [(google.api.field_behavior) = REQUIRED]; + string framework = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudsecuritycompliance.googleapis.com/Framework" + } + ]; // Optional. The major version of the framework. If not specified, the version // corresponds to the latest version of the framework. @@ -348,6 +375,7 @@ message CloudControl { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/CloudControl" pattern: "organizations/{organization}/locations/{location}/cloudControls/{cloud_control}" + pattern: "projects/{project}/locations/{location}/cloudControls/{cloud_control}" plural: "cloudControls" singular: "cloudControl" }; @@ -364,8 +392,12 @@ message CloudControl { BUILT_IN = 2; } - // Required. Identifier. The name of the cloud control, in the format - // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control_id}`. + // Required. Identifier. The name of the cloud control, in either of the + // formats: + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + // or + // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + // // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -535,20 +567,20 @@ message StringList { message ParamValue { // The list of possible parameter value types. oneof kind { - // A string value. - string string_value = 3; + // Optional. A string value. + string string_value = 3 [(google.api.field_behavior) = OPTIONAL]; - // A boolean value. - bool bool_value = 4; + // Optional. A boolean value. + bool bool_value = 4 [(google.api.field_behavior) = OPTIONAL]; - // A repeated string. - StringList string_list_value = 5; + // Optional. A repeated string. + StringList string_list_value = 5 [(google.api.field_behavior) = OPTIONAL]; - // A double value. - double number_value = 6; + // Optional. A double value. + double number_value = 6 [(google.api.field_behavior) = OPTIONAL]; - // Sub-parameter values. - Parameter oneof_value = 7; + // Optional. Sub-parameter values. + Parameter oneof_value = 7 [(google.api.field_behavior) = OPTIONAL]; } } @@ -639,6 +671,135 @@ message OperationMetadata { string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// The regulatory control. +message Control { + option (google.api.resource) = { + type: "cloudsecuritycompliance.googleapis.com/Control" + pattern: "organizations/{organization}/locations/{location}/controls/{control}" + pattern: "projects/{project}/locations/{location}/controls/{control}" + plural: "controls" + singular: "control" + }; + + // The regulatory control family. + enum Family { + // Default value. This value is unused. + FAMILY_UNSPECIFIED = 0; + + // Access control + AC = 1; + + // Awareness and araining + AT = 2; + + // Audit and accountability + AU = 3; + + // Certification, accreditation, and security assessments + CA = 4; + + // Configuration management + CM = 5; + + // Contingency planning + CP = 6; + + // Identification and authentication + IA = 7; + + // Incident response + IR = 8; + + // Maintenance + MA = 9; + + // Media protection + MP = 10; + + // Physical and environmental protection + PE = 11; + + // Security planning + PL = 12; + + // Personnel aecurity + PS = 13; + + // Risk assessment + RA = 14; + + // System services and acquisition + SA = 15; + + // System and communications protection + SC = 16; + + // System and information integrity + SI = 17; + + // Supply chain risk management + SR = 18; + } + + // Output only. The name of a regulatory control, in one of the following + // formats: + // - `organizations/{organization}/locations/{location}/controls/{control}` + // - `projects/{project}/locations/{location}/controls/{control}`. + // + // The only supported location is `global`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The friendly name for the regulatory control. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the regulatory control. + string description = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The regulatory group that the control belongs to. + Family family = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The regulatory family that the control belongs to. + ControlFamily control_family = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The entity that's responsible for the control, whether Google, + // you as the customer, or both. + RegulatoryControlResponsibilityType responsibility_type = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of Google's responsibility for the regulatory + // control. + string google_responsibility_description = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of Google's responsibility for implementing the + // regulatory control. + string google_responsibility_implementation = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of your responsibility for the regulatory + // control. + string customer_responsibility_description = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of the your responsibility for implementing the + // regulatory control. + string customer_responsibility_implementation = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of the responsibility that's shared between + // Google and you in implementing this control. + string shared_responsibility_description = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A link to the documentation that's related to this control. + string additional_content_uri = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The frameworks that include this control. + repeated string related_frameworks = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // The regulatory family of the control. message ControlFamily { // The identifier for the regulatory control family. diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto index 9ef74423c8e..85c153b90b9 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -46,6 +46,9 @@ service Config { rpc ListFrameworks(ListFrameworksRequest) returns (ListFrameworksResponse) { option (google.api.http) = { get: "/v1/{parent=organizations/*/locations/*}/frameworks" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworks" + } }; option (google.api.method_signature) = "parent"; } @@ -58,6 +61,9 @@ service Config { rpc GetFramework(GetFrameworkRequest) returns (Framework) { option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*/frameworks/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworks/*}" + } }; option (google.api.method_signature) = "name"; } @@ -69,6 +75,10 @@ service Config { option (google.api.http) = { post: "/v1/{parent=organizations/*/locations/*}/frameworks" body: "framework" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/frameworks" + body: "framework" + } }; option (google.api.method_signature) = "parent,framework,framework_id"; } @@ -89,6 +99,10 @@ service Config { option (google.api.http) = { patch: "/v1/{framework.name=organizations/*/locations/*/frameworks/*}" body: "framework" + additional_bindings { + patch: "/v1/{framework.name=projects/*/locations/*/frameworks/*}" + body: "framework" + } }; option (google.api.method_signature) = "framework,update_mask"; } @@ -103,6 +117,9 @@ service Config { rpc DeleteFramework(DeleteFrameworkRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=organizations/*/locations/*/frameworks/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/frameworks/*}" + } }; option (google.api.method_signature) = "name"; } @@ -115,6 +132,9 @@ service Config { returns (ListCloudControlsResponse) { option (google.api.http) = { get: "/v1/{parent=organizations/*/locations/*}/cloudControls" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/cloudControls" + } }; option (google.api.method_signature) = "parent"; } @@ -129,6 +149,9 @@ service Config { rpc GetCloudControl(GetCloudControlRequest) returns (CloudControl) { option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*/cloudControls/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/cloudControls/*}" + } }; option (google.api.method_signature) = "name"; } @@ -141,6 +164,10 @@ service Config { option (google.api.http) = { post: "/v1/{parent=organizations/*/locations/*}/cloudControls" body: "cloud_control" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/cloudControls" + body: "cloud_control" + } }; option (google.api.method_signature) = "parent,cloud_control,cloud_control_id"; @@ -162,6 +189,10 @@ service Config { option (google.api.http) = { patch: "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}" body: "cloud_control" + additional_bindings { + patch: "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}" + body: "cloud_control" + } }; option (google.api.method_signature) = "cloud_control,update_mask"; } @@ -178,6 +209,9 @@ service Config { returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=organizations/*/locations/*/cloudControls/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/cloudControls/*}" + } }; option (google.api.method_signature) = "name"; } @@ -185,8 +219,10 @@ service Config { // Request message for [ListFrameworks][]. message ListFrameworksRequest { - // Required. The parent resource name, in the format - // `organizations/{organization}/locations/{location}`. + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}` + // - `projects/{project}/locations/{location}`. + // // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -220,8 +256,12 @@ message ListFrameworksResponse { // The request message for [GetFramework][]. message GetFrameworkRequest { - // Required. The name of the framework to retrieve, in the format - // `organizations/{organization}/locations/{location}/frameworks/{framework_id}` + // Required. The name of the framework to retrieve, in one of the following + // formats: + // `organizations/{organization}/locations/{location}/frameworks/{framework}` + // or + // `projects/{project}/locations/{location}/frameworks/{framework}`. + // // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -237,8 +277,10 @@ message GetFrameworkRequest { // The request message for [CreateFramework][]. message CreateFrameworkRequest { - // Required. The parent resource name, in the format - // `organizations/{organization}/locations/{location}`. + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}` + // - `projects/{project}/locations/{location}`. + // // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -274,8 +316,11 @@ message UpdateFrameworkRequest { // Request message for [DeleteFramework][]. message DeleteFrameworkRequest { - // Required. The name of the resource, in the format - // `organizations/{organization}/locations/{location}/frameworks/{framework}`. + // Required. The name of the resource, in one of the following formats: + // `organizations/{organization}/locations/{location}/frameworks/{framework}` + // or + // `projects/{project}/locations/{location}/frameworks/{framework}`. + // // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -287,8 +332,10 @@ message DeleteFrameworkRequest { // Request message for [ListCloudControls][]. message ListCloudControlsRequest { - // Required. The parent resource name, in the format - // `organizations/{organization}/locations/{location}`. + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}` + // - `projects/{project}/locations/{location}`. + // // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -326,8 +373,12 @@ message ListCloudControlsResponse { // The request message for [GetCloudControl][]. message GetCloudControlRequest { - // Required. The name of the cloud control to retrieve, in the format - // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`. + // Required. The name of the cloud control to retrieve, in one of the + // following formats: + // `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + // or + // `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + // // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -343,8 +394,10 @@ message GetCloudControlRequest { // The request message for [CreateCloudControl][]. message CreateCloudControlRequest { - // Required. The parent resource name, in the format - // `organizations/{organization}/locations/{location}`. + // Required. The parent resource name, in one of the following formats: + // - `organizations/{organization}/locations/{location}`. + // - `projects/{project}/locations/{location}`. + // // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -387,8 +440,12 @@ message UpdateCloudControlRequest { // The request message for [DeleteCloudControl][]. message DeleteCloudControlRequest { - // Required. The name of the cloud control to delete, in the format - // `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`. + // Required. The name of the cloud control to delete, in one of the following + // formats: + // `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + // or + // `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + // // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto index 343819f0f4b..be772f7cfb9 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/deployment.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,6 +49,10 @@ service Deployment { option (google.api.http) = { post: "/v1/{parent=organizations/*/locations/*}/frameworkDeployments" body: "framework_deployment" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/frameworkDeployments" + body: "framework_deployment" + } }; option (google.api.method_signature) = "parent,framework_deployment,framework_deployment_id"; @@ -63,6 +67,9 @@ service Deployment { returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } }; option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { @@ -76,6 +83,9 @@ service Deployment { returns (FrameworkDeployment) { option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } }; option (google.api.method_signature) = "name"; } @@ -85,6 +95,9 @@ service Deployment { returns (ListFrameworkDeploymentsResponse) { option (google.api.http) = { get: "/v1/{parent=organizations/*/locations/*}/frameworkDeployments" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/frameworkDeployments" + } }; option (google.api.method_signature) = "parent"; } @@ -94,6 +107,9 @@ service Deployment { returns (CloudControlDeployment) { option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}" + } }; option (google.api.method_signature) = "name"; } @@ -103,6 +119,9 @@ service Deployment { returns (ListCloudControlDeploymentsResponse) { option (google.api.http) = { get: "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/cloudControlDeployments" + } }; option (google.api.method_signature) = "parent"; } @@ -122,6 +141,9 @@ enum DeploymentState { // Deployment is being deleted. DEPLOYMENT_STATE_DELETING = 3; + // Deployment is being updated. + DEPLOYMENT_STATE_UPDATING = 8; + // Deployment has failed. All the changes made by the deployment were // successfully rolled back. You can retry or delete a deployment that's // in this state. @@ -148,12 +170,15 @@ message FrameworkDeployment { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/FrameworkDeployment" pattern: "organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}" + pattern: "projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}" plural: "frameworkDeployments" singular: "frameworkDeployment" }; // Identifier. The name of the framework deployment, in the format - // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. // The only supported location is `global`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; @@ -236,12 +261,15 @@ message CloudControlDeployment { option (google.api.resource) = { type: "cloudsecuritycompliance.googleapis.com/CloudControlDeployment" pattern: "organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}" + pattern: "projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}" plural: "cloudControlDeployments" singular: "cloudControlDeployment" }; // Identifier. The name for the cloud control deployment, in the format - // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + // or + // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. // The only supported location is `global`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; @@ -372,7 +400,9 @@ message CloudControlMetadata { // The request message for [CreateFrameworkDeployment][]. message CreateFrameworkDeploymentRequest { // Required. The parent resource of the framework deployment in the format - // `organizations/{organization}/locations/{location}`. + // `organizations/{organization}/locations/{location}` + // or + // `projects/{project}/locations/{location}`. // Only the global location is supported. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -395,7 +425,9 @@ message CreateFrameworkDeploymentRequest { message DeleteFrameworkDeploymentRequest { // Required. The name of the framework deployment that you want to delete, // in the format - // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -418,7 +450,9 @@ message DeleteFrameworkDeploymentRequest { // The request message for [GetFrameworkDeployment][]. message GetFrameworkDeploymentRequest { // Required. The name of the framework deployment, in the format - // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -431,7 +465,9 @@ message GetFrameworkDeploymentRequest { // The request message for [ListFrameworkDeployments][]. message ListFrameworkDeploymentsRequest { // Required. The parent resource of the framework deployment, in the format - // `organizations/{organization}/locations/{location}`. + // `organizations/{organization}/locations/{location}` + // or + // `projects/{project}/locations/{location}`. // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -476,7 +512,9 @@ message ListFrameworkDeploymentsResponse { // The request message for [GetCloudControlDeployment][]. message GetCloudControlDeploymentRequest { // Required. The name for the cloud control deployment, in the format - // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + // or + // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. // The only supported location is `global`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -489,8 +527,9 @@ message GetCloudControlDeploymentRequest { // The request message for [ListCloudControlDeployments][]. message ListCloudControlDeploymentsRequest { // Required. The parent resource for the cloud control deployment, in the - // format `organizations/{organization}/locations/{location}`. The only - // supported location is `global`. + // format `organizations/{organization}/locations/{location}` or + // `projects/{project}/locations/{location}`. + // The only supported location is `global`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -534,7 +573,9 @@ message ListCloudControlDeploymentsResponse { // The reference to a cloud control deployment. message CloudControlDeploymentReference { // Output only. The name of the CloudControlDeployment. The format is - // `organizations/{org}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + // `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + // or + // `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. // The only supported location is `global`. string cloud_control_deployment = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, @@ -547,7 +588,9 @@ message CloudControlDeploymentReference { // The reference to a framework deployment. message FrameworkDeploymentReference { // Output only. The name of the framework deployment, in the format - // `organizations/{org}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + // `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + // or + // `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. // The only supported location is `global`. string framework_deployment = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, @@ -562,7 +605,7 @@ message FrameworkDeploymentReference { // ``` // { // framework: - // "organizations/{org}/locations/{location}/frameworks/{framework}", + // "organizations/{organization}/locations/{location}/frameworks/{framework}", // major_revision_id: 1 // } // ``` diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto index a8c4fc0ff03..b2a5c3eae33 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto +++ b/packages/google-cloud-cloudsecuritycompliance/protos/google/cloud/cloudsecuritycompliance/v1/monitoring.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/cloudsecuritycompliance/v1/common.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/type/interval.proto"; @@ -174,6 +175,23 @@ enum FindingClass { CHOKEPOINT = 9; } +// Specifies the view of the framework compliance summary to be returned. +// New values may be added in the future. +enum FrameworkComplianceSummaryView { + // The default / unset value. The API will default to the BASIC view. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0; + + // Includes basic compliance metadata, but omits trend data. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1; + + // Includes all information, including + // [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count] + // and + // [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend]. + // Trend data is provided for the last 30 days. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2; +} + // The request message for // [ListFrameworkComplianceSummariesRequest][google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest]. message ListFrameworkComplianceSummariesRequest { @@ -195,6 +213,10 @@ message ListFrameworkComplianceSummariesRequest { // Optional. The filtering results. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the level of detail to return in the response. + FrameworkComplianceSummaryView view = 5 + [(google.api.field_behavior) = OPTIONAL]; } // The response message for @@ -269,6 +291,9 @@ message FetchFrameworkComplianceReportRequest { // Optional. The end time of the report. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filtering results. + string filter = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [ListFindingSummaries][]. @@ -425,6 +450,12 @@ message FrameworkComplianceSummary { // The target resource details for the framework. repeated TargetResourceDetails target_resource_details = 10; + + // Output only. The count of the findings generated against the framework. + int64 finding_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The trend of controls that are passing for the given duration. + Trend controls_passing_trend = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The details for a finding. @@ -626,3 +657,14 @@ message TargetResourceDetails { // The minor revision ID of the framework for the target resource. int64 minor_revision_id = 7; } + +// The trend of a compliance metric. +message Trend { + // Output only. The duration for the trend. + google.protobuf.Duration duration = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The trend value as a percentage. The value can be positive or + // negative. + double value_percent = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts b/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts index 3c290d62d46..7d8d15d1f33 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts +++ b/packages/google-cloud-cloudsecuritycompliance/protos/protos.d.ts @@ -1985,7 +1985,11 @@ export namespace google { CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12, CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13, CC_CATEGORY_PRIVACY = 14, - CC_CATEGORY_BCDR = 15 + CC_CATEGORY_BCDR = 15, + CC_CATEGORY_ADMIN_ACCESS = 16, + CC_CATEGORY_DATA_RESIDENCY = 17, + CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18, + CC_CATEGORY_SERVICE_SPECIFIC = 19 } /** CloudProvider enum. */ @@ -4128,6 +4132,201 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a Control. */ + interface IControl { + + /** Control name */ + name?: (string|null); + + /** Control displayName */ + displayName?: (string|null); + + /** Control description */ + description?: (string|null); + + /** Control family */ + family?: (google.cloud.cloudsecuritycompliance.v1.Control.Family|keyof typeof google.cloud.cloudsecuritycompliance.v1.Control.Family|null); + + /** Control controlFamily */ + controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** Control responsibilityType */ + responsibilityType?: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null); + + /** Control googleResponsibilityDescription */ + googleResponsibilityDescription?: (string|null); + + /** Control googleResponsibilityImplementation */ + googleResponsibilityImplementation?: (string|null); + + /** Control customerResponsibilityDescription */ + customerResponsibilityDescription?: (string|null); + + /** Control customerResponsibilityImplementation */ + customerResponsibilityImplementation?: (string|null); + + /** Control sharedResponsibilityDescription */ + sharedResponsibilityDescription?: (string|null); + + /** Control additionalContentUri */ + additionalContentUri?: (string|null); + + /** Control relatedFrameworks */ + relatedFrameworks?: (string[]|null); + } + + /** Represents a Control. */ + class Control implements IControl { + + /** + * Constructs a new Control. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.IControl); + + /** Control name. */ + public name: string; + + /** Control displayName. */ + public displayName: string; + + /** Control description. */ + public description: string; + + /** Control family. */ + public family: (google.cloud.cloudsecuritycompliance.v1.Control.Family|keyof typeof google.cloud.cloudsecuritycompliance.v1.Control.Family); + + /** Control controlFamily. */ + public controlFamily?: (google.cloud.cloudsecuritycompliance.v1.IControlFamily|null); + + /** Control responsibilityType. */ + public responsibilityType: (google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|keyof typeof google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType); + + /** Control googleResponsibilityDescription. */ + public googleResponsibilityDescription: string; + + /** Control googleResponsibilityImplementation. */ + public googleResponsibilityImplementation: string; + + /** Control customerResponsibilityDescription. */ + public customerResponsibilityDescription: string; + + /** Control customerResponsibilityImplementation. */ + public customerResponsibilityImplementation: string; + + /** Control sharedResponsibilityDescription. */ + public sharedResponsibilityDescription: string; + + /** Control additionalContentUri. */ + public additionalContentUri: string; + + /** Control relatedFrameworks. */ + public relatedFrameworks: string[]; + + /** + * Creates a new Control instance using the specified properties. + * @param [properties] Properties to set + * @returns Control instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.IControl): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Encodes the specified Control message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @param message Control message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @param message Control message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.IControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Control message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Decodes a Control message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Verifies a Control message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Control message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Control + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Control; + + /** + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @param message Control + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Control, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Control to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Control + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Control { + + /** Family enum. */ + enum Family { + FAMILY_UNSPECIFIED = 0, + AC = 1, + AT = 2, + AU = 3, + CA = 4, + CM = 5, + CP = 6, + IA = 7, + IR = 8, + MA = 9, + MP = 10, + PE = 11, + PL = 12, + PS = 13, + RA = 14, + SA = 15, + SC = 16, + SI = 17, + SR = 18 + } + } + /** Properties of a ControlFamily. */ interface IControlFamily { @@ -6547,6 +6746,7 @@ export namespace google { DEPLOYMENT_STATE_VALIDATING = 1, DEPLOYMENT_STATE_CREATING = 2, DEPLOYMENT_STATE_DELETING = 3, + DEPLOYMENT_STATE_UPDATING = 8, DEPLOYMENT_STATE_FAILED = 4, DEPLOYMENT_STATE_READY = 5, DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6, @@ -8617,6 +8817,13 @@ export namespace google { CHOKEPOINT = 9 } + /** FrameworkComplianceSummaryView enum. */ + enum FrameworkComplianceSummaryView { + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0, + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1, + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2 + } + /** Properties of a ListFrameworkComplianceSummariesRequest. */ interface IListFrameworkComplianceSummariesRequest { @@ -8631,6 +8838,9 @@ export namespace google { /** ListFrameworkComplianceSummariesRequest filter */ filter?: (string|null); + + /** ListFrameworkComplianceSummariesRequest view */ + view?: (google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|null); } /** Represents a ListFrameworkComplianceSummariesRequest. */ @@ -8654,6 +8864,9 @@ export namespace google { /** ListFrameworkComplianceSummariesRequest filter. */ public filter: string; + /** ListFrameworkComplianceSummariesRequest view. */ + public view: (google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|keyof typeof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView); + /** * Creates a new ListFrameworkComplianceSummariesRequest instance using the specified properties. * @param [properties] Properties to set @@ -9006,6 +9219,9 @@ export namespace google { /** FetchFrameworkComplianceReportRequest endTime */ endTime?: (google.protobuf.ITimestamp|null); + + /** FetchFrameworkComplianceReportRequest filter */ + filter?: (string|null); } /** Represents a FetchFrameworkComplianceReportRequest. */ @@ -9023,6 +9239,9 @@ export namespace google { /** FetchFrameworkComplianceReportRequest endTime. */ public endTime?: (google.protobuf.ITimestamp|null); + /** FetchFrameworkComplianceReportRequest filter. */ + public filter: string; + /** * Creates a new FetchFrameworkComplianceReportRequest instance using the specified properties. * @param [properties] Properties to set @@ -9902,6 +10121,12 @@ export namespace google { /** FrameworkComplianceSummary targetResourceDetails */ targetResourceDetails?: (google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]|null); + + /** FrameworkComplianceSummary findingCount */ + findingCount?: (number|Long|string|null); + + /** FrameworkComplianceSummary controlsPassingTrend */ + controlsPassingTrend?: (google.cloud.cloudsecuritycompliance.v1.ITrend|null); } /** Represents a FrameworkComplianceSummary. */ @@ -9943,6 +10168,12 @@ export namespace google { /** FrameworkComplianceSummary targetResourceDetails. */ public targetResourceDetails: google.cloud.cloudsecuritycompliance.v1.ITargetResourceDetails[]; + /** FrameworkComplianceSummary findingCount. */ + public findingCount: (number|Long|string); + + /** FrameworkComplianceSummary controlsPassingTrend. */ + public controlsPassingTrend?: (google.cloud.cloudsecuritycompliance.v1.ITrend|null); + /** * Creates a new FrameworkComplianceSummary instance using the specified properties. * @param [properties] Properties to set @@ -11039,6 +11270,109 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a Trend. */ + interface ITrend { + + /** Trend duration */ + duration?: (google.protobuf.IDuration|null); + + /** Trend valuePercent */ + valuePercent?: (number|null); + } + + /** Represents a Trend. */ + class Trend implements ITrend { + + /** + * Constructs a new Trend. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.cloudsecuritycompliance.v1.ITrend); + + /** Trend duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** Trend valuePercent. */ + public valuePercent: number; + + /** + * Creates a new Trend instance using the specified properties. + * @param [properties] Properties to set + * @returns Trend instance + */ + public static create(properties?: google.cloud.cloudsecuritycompliance.v1.ITrend): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Encodes the specified Trend message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @param message Trend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.cloudsecuritycompliance.v1.ITrend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trend message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @param message Trend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.cloudsecuritycompliance.v1.ITrend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Decodes a Trend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Verifies a Trend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trend + */ + public static fromObject(object: { [k: string]: any }): google.cloud.cloudsecuritycompliance.v1.Trend; + + /** + * Creates a plain object from a Trend message. Also converts values to other types if specified. + * @param message Trend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.cloudsecuritycompliance.v1.Trend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trend + * @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-cloudsecuritycompliance/protos/protos.js b/packages/google-cloud-cloudsecuritycompliance/protos/protos.js index 62e842d9106..e0d9a03dc52 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/protos.js +++ b/packages/google-cloud-cloudsecuritycompliance/protos/protos.js @@ -5082,6 +5082,10 @@ * @property {number} CC_CATEGORY_VULNERABILITY_MANAGEMENT=13 CC_CATEGORY_VULNERABILITY_MANAGEMENT value * @property {number} CC_CATEGORY_PRIVACY=14 CC_CATEGORY_PRIVACY value * @property {number} CC_CATEGORY_BCDR=15 CC_CATEGORY_BCDR value + * @property {number} CC_CATEGORY_ADMIN_ACCESS=16 CC_CATEGORY_ADMIN_ACCESS value + * @property {number} CC_CATEGORY_DATA_RESIDENCY=17 CC_CATEGORY_DATA_RESIDENCY value + * @property {number} CC_CATEGORY_RESOURCE_USAGE_RESTRICTION=18 CC_CATEGORY_RESOURCE_USAGE_RESTRICTION value + * @property {number} CC_CATEGORY_SERVICE_SPECIFIC=19 CC_CATEGORY_SERVICE_SPECIFIC value */ v1.CloudControlCategory = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -5101,6 +5105,10 @@ values[valuesById[13] = "CC_CATEGORY_VULNERABILITY_MANAGEMENT"] = 13; values[valuesById[14] = "CC_CATEGORY_PRIVACY"] = 14; values[valuesById[15] = "CC_CATEGORY_BCDR"] = 15; + values[valuesById[16] = "CC_CATEGORY_ADMIN_ACCESS"] = 16; + values[valuesById[17] = "CC_CATEGORY_DATA_RESIDENCY"] = 17; + values[valuesById[18] = "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION"] = 18; + values[valuesById[19] = "CC_CATEGORY_SERVICE_SPECIFIC"] = 19; return values; })(); @@ -7179,6 +7187,10 @@ case 13: case 14: case 15: + case 16: + case 17: + case 18: + case 19: break; } } @@ -7424,6 +7436,22 @@ case 15: message.categories[i] = 15; break; + case "CC_CATEGORY_ADMIN_ACCESS": + case 16: + message.categories[i] = 16; + break; + case "CC_CATEGORY_DATA_RESIDENCY": + case 17: + message.categories[i] = 17; + break; + case "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION": + case 18: + message.categories[i] = 18; + break; + case "CC_CATEGORY_SERVICE_SPECIFIC": + case 19: + message.categories[i] = 19; + break; } } if (object.createTime != null) { @@ -11277,7 +11305,692 @@ return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.OperationMetadata"; }; - return OperationMetadata; + return OperationMetadata; + })(); + + v1.Control = (function() { + + /** + * Properties of a Control. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface IControl + * @property {string|null} [name] Control name + * @property {string|null} [displayName] Control displayName + * @property {string|null} [description] Control description + * @property {google.cloud.cloudsecuritycompliance.v1.Control.Family|null} [family] Control family + * @property {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null} [controlFamily] Control controlFamily + * @property {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType|null} [responsibilityType] Control responsibilityType + * @property {string|null} [googleResponsibilityDescription] Control googleResponsibilityDescription + * @property {string|null} [googleResponsibilityImplementation] Control googleResponsibilityImplementation + * @property {string|null} [customerResponsibilityDescription] Control customerResponsibilityDescription + * @property {string|null} [customerResponsibilityImplementation] Control customerResponsibilityImplementation + * @property {string|null} [sharedResponsibilityDescription] Control sharedResponsibilityDescription + * @property {string|null} [additionalContentUri] Control additionalContentUri + * @property {Array.|null} [relatedFrameworks] Control relatedFrameworks + */ + + /** + * Constructs a new Control. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Control. + * @implements IControl + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.IControl=} [properties] Properties to set + */ + function Control(properties) { + this.relatedFrameworks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Control name. + * @member {string} name + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.name = ""; + + /** + * Control displayName. + * @member {string} displayName + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.displayName = ""; + + /** + * Control description. + * @member {string} description + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.description = ""; + + /** + * Control family. + * @member {google.cloud.cloudsecuritycompliance.v1.Control.Family} family + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.family = 0; + + /** + * Control controlFamily. + * @member {google.cloud.cloudsecuritycompliance.v1.IControlFamily|null|undefined} controlFamily + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.controlFamily = null; + + /** + * Control responsibilityType. + * @member {google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType} responsibilityType + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.responsibilityType = 0; + + /** + * Control googleResponsibilityDescription. + * @member {string} googleResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.googleResponsibilityDescription = ""; + + /** + * Control googleResponsibilityImplementation. + * @member {string} googleResponsibilityImplementation + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.googleResponsibilityImplementation = ""; + + /** + * Control customerResponsibilityDescription. + * @member {string} customerResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.customerResponsibilityDescription = ""; + + /** + * Control customerResponsibilityImplementation. + * @member {string} customerResponsibilityImplementation + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.customerResponsibilityImplementation = ""; + + /** + * Control sharedResponsibilityDescription. + * @member {string} sharedResponsibilityDescription + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.sharedResponsibilityDescription = ""; + + /** + * Control additionalContentUri. + * @member {string} additionalContentUri + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.additionalContentUri = ""; + + /** + * Control relatedFrameworks. + * @member {Array.} relatedFrameworks + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + */ + Control.prototype.relatedFrameworks = $util.emptyArray; + + /** + * Creates a new Control instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControl=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control instance + */ + Control.create = function create(properties) { + return new Control(properties); + }; + + /** + * Encodes the specified Control message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.family != null && Object.hasOwnProperty.call(message, "family")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.family); + if (message.controlFamily != null && Object.hasOwnProperty.call(message, "controlFamily")) + $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.encode(message.controlFamily, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.responsibilityType != null && Object.hasOwnProperty.call(message, "responsibilityType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.responsibilityType); + if (message.googleResponsibilityDescription != null && Object.hasOwnProperty.call(message, "googleResponsibilityDescription")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.googleResponsibilityDescription); + if (message.googleResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "googleResponsibilityImplementation")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.googleResponsibilityImplementation); + if (message.customerResponsibilityDescription != null && Object.hasOwnProperty.call(message, "customerResponsibilityDescription")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.customerResponsibilityDescription); + if (message.customerResponsibilityImplementation != null && Object.hasOwnProperty.call(message, "customerResponsibilityImplementation")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.customerResponsibilityImplementation); + if (message.sharedResponsibilityDescription != null && Object.hasOwnProperty.call(message, "sharedResponsibilityDescription")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.sharedResponsibilityDescription); + if (message.additionalContentUri != null && Object.hasOwnProperty.call(message, "additionalContentUri")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.additionalContentUri); + if (message.relatedFrameworks != null && message.relatedFrameworks.length) + for (var i = 0; i < message.relatedFrameworks.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.relatedFrameworks[i]); + return writer; + }; + + /** + * Encodes the specified Control message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Control.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.IControl} message Control message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Control.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Control message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Control(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.family = reader.int32(); + break; + } + case 6: { + message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.decode(reader, reader.uint32()); + break; + } + case 7: { + message.responsibilityType = reader.int32(); + break; + } + case 8: { + message.googleResponsibilityDescription = reader.string(); + break; + } + case 9: { + message.googleResponsibilityImplementation = reader.string(); + break; + } + case 10: { + message.customerResponsibilityDescription = reader.string(); + break; + } + case 11: { + message.customerResponsibilityImplementation = reader.string(); + break; + } + case 12: { + message.sharedResponsibilityDescription = reader.string(); + break; + } + case 13: { + message.additionalContentUri = reader.string(); + break; + } + case 14: { + if (!(message.relatedFrameworks && message.relatedFrameworks.length)) + message.relatedFrameworks = []; + message.relatedFrameworks.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Control message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Control.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Control message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Control.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.family != null && message.hasOwnProperty("family")) + switch (message.family) { + default: + return "family: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.verify(message.controlFamily); + if (error) + return "controlFamily." + error; + } + if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) + switch (message.responsibilityType) { + default: + return "responsibilityType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) + if (!$util.isString(message.googleResponsibilityDescription)) + return "googleResponsibilityDescription: string expected"; + if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) + if (!$util.isString(message.googleResponsibilityImplementation)) + return "googleResponsibilityImplementation: string expected"; + if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) + if (!$util.isString(message.customerResponsibilityDescription)) + return "customerResponsibilityDescription: string expected"; + if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) + if (!$util.isString(message.customerResponsibilityImplementation)) + return "customerResponsibilityImplementation: string expected"; + if (message.sharedResponsibilityDescription != null && message.hasOwnProperty("sharedResponsibilityDescription")) + if (!$util.isString(message.sharedResponsibilityDescription)) + return "sharedResponsibilityDescription: string expected"; + if (message.additionalContentUri != null && message.hasOwnProperty("additionalContentUri")) + if (!$util.isString(message.additionalContentUri)) + return "additionalContentUri: string expected"; + if (message.relatedFrameworks != null && message.hasOwnProperty("relatedFrameworks")) { + if (!Array.isArray(message.relatedFrameworks)) + return "relatedFrameworks: array expected"; + for (var i = 0; i < message.relatedFrameworks.length; ++i) + if (!$util.isString(message.relatedFrameworks[i])) + return "relatedFrameworks: string[] expected"; + } + return null; + }; + + /** + * Creates a Control message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Control} Control + */ + Control.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Control) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Control(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.family) { + default: + if (typeof object.family === "number") { + message.family = object.family; + break; + } + break; + case "FAMILY_UNSPECIFIED": + case 0: + message.family = 0; + break; + case "AC": + case 1: + message.family = 1; + break; + case "AT": + case 2: + message.family = 2; + break; + case "AU": + case 3: + message.family = 3; + break; + case "CA": + case 4: + message.family = 4; + break; + case "CM": + case 5: + message.family = 5; + break; + case "CP": + case 6: + message.family = 6; + break; + case "IA": + case 7: + message.family = 7; + break; + case "IR": + case 8: + message.family = 8; + break; + case "MA": + case 9: + message.family = 9; + break; + case "MP": + case 10: + message.family = 10; + break; + case "PE": + case 11: + message.family = 11; + break; + case "PL": + case 12: + message.family = 12; + break; + case "PS": + case 13: + message.family = 13; + break; + case "RA": + case 14: + message.family = 14; + break; + case "SA": + case 15: + message.family = 15; + break; + case "SC": + case 16: + message.family = 16; + break; + case "SI": + case 17: + message.family = 17; + break; + case "SR": + case 18: + message.family = 18; + break; + } + if (object.controlFamily != null) { + if (typeof object.controlFamily !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Control.controlFamily: object expected"); + message.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.fromObject(object.controlFamily); + } + switch (object.responsibilityType) { + default: + if (typeof object.responsibilityType === "number") { + message.responsibilityType = object.responsibilityType; + break; + } + break; + case "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED": + case 0: + message.responsibilityType = 0; + break; + case "GOOGLE": + case 1: + message.responsibilityType = 1; + break; + case "CUSTOMER": + case 2: + message.responsibilityType = 2; + break; + case "SHARED": + case 3: + message.responsibilityType = 3; + break; + } + if (object.googleResponsibilityDescription != null) + message.googleResponsibilityDescription = String(object.googleResponsibilityDescription); + if (object.googleResponsibilityImplementation != null) + message.googleResponsibilityImplementation = String(object.googleResponsibilityImplementation); + if (object.customerResponsibilityDescription != null) + message.customerResponsibilityDescription = String(object.customerResponsibilityDescription); + if (object.customerResponsibilityImplementation != null) + message.customerResponsibilityImplementation = String(object.customerResponsibilityImplementation); + if (object.sharedResponsibilityDescription != null) + message.sharedResponsibilityDescription = String(object.sharedResponsibilityDescription); + if (object.additionalContentUri != null) + message.additionalContentUri = String(object.additionalContentUri); + if (object.relatedFrameworks) { + if (!Array.isArray(object.relatedFrameworks)) + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Control.relatedFrameworks: array expected"); + message.relatedFrameworks = []; + for (var i = 0; i < object.relatedFrameworks.length; ++i) + message.relatedFrameworks[i] = String(object.relatedFrameworks[i]); + } + return message; + }; + + /** + * Creates a plain object from a Control message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Control} message Control + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Control.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedFrameworks = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.family = options.enums === String ? "FAMILY_UNSPECIFIED" : 0; + object.controlFamily = null; + object.responsibilityType = options.enums === String ? "REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED" : 0; + object.googleResponsibilityDescription = ""; + object.googleResponsibilityImplementation = ""; + object.customerResponsibilityDescription = ""; + object.customerResponsibilityImplementation = ""; + object.sharedResponsibilityDescription = ""; + object.additionalContentUri = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.family != null && message.hasOwnProperty("family")) + object.family = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.Control.Family[message.family] === undefined ? message.family : $root.google.cloud.cloudsecuritycompliance.v1.Control.Family[message.family] : message.family; + if (message.controlFamily != null && message.hasOwnProperty("controlFamily")) + object.controlFamily = $root.google.cloud.cloudsecuritycompliance.v1.ControlFamily.toObject(message.controlFamily, options); + if (message.responsibilityType != null && message.hasOwnProperty("responsibilityType")) + object.responsibilityType = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.responsibilityType] === undefined ? message.responsibilityType : $root.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType[message.responsibilityType] : message.responsibilityType; + if (message.googleResponsibilityDescription != null && message.hasOwnProperty("googleResponsibilityDescription")) + object.googleResponsibilityDescription = message.googleResponsibilityDescription; + if (message.googleResponsibilityImplementation != null && message.hasOwnProperty("googleResponsibilityImplementation")) + object.googleResponsibilityImplementation = message.googleResponsibilityImplementation; + if (message.customerResponsibilityDescription != null && message.hasOwnProperty("customerResponsibilityDescription")) + object.customerResponsibilityDescription = message.customerResponsibilityDescription; + if (message.customerResponsibilityImplementation != null && message.hasOwnProperty("customerResponsibilityImplementation")) + object.customerResponsibilityImplementation = message.customerResponsibilityImplementation; + if (message.sharedResponsibilityDescription != null && message.hasOwnProperty("sharedResponsibilityDescription")) + object.sharedResponsibilityDescription = message.sharedResponsibilityDescription; + if (message.additionalContentUri != null && message.hasOwnProperty("additionalContentUri")) + object.additionalContentUri = message.additionalContentUri; + if (message.relatedFrameworks && message.relatedFrameworks.length) { + object.relatedFrameworks = []; + for (var j = 0; j < message.relatedFrameworks.length; ++j) + object.relatedFrameworks[j] = message.relatedFrameworks[j]; + } + return object; + }; + + /** + * Converts this Control to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @instance + * @returns {Object.} JSON object + */ + Control.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Control + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Control + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Control.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Control"; + }; + + /** + * Family enum. + * @name google.cloud.cloudsecuritycompliance.v1.Control.Family + * @enum {number} + * @property {number} FAMILY_UNSPECIFIED=0 FAMILY_UNSPECIFIED value + * @property {number} AC=1 AC value + * @property {number} AT=2 AT value + * @property {number} AU=3 AU value + * @property {number} CA=4 CA value + * @property {number} CM=5 CM value + * @property {number} CP=6 CP value + * @property {number} IA=7 IA value + * @property {number} IR=8 IR value + * @property {number} MA=9 MA value + * @property {number} MP=10 MP value + * @property {number} PE=11 PE value + * @property {number} PL=12 PL value + * @property {number} PS=13 PS value + * @property {number} RA=14 RA value + * @property {number} SA=15 SA value + * @property {number} SC=16 SC value + * @property {number} SI=17 SI value + * @property {number} SR=18 SR value + */ + Control.Family = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAMILY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AC"] = 1; + values[valuesById[2] = "AT"] = 2; + values[valuesById[3] = "AU"] = 3; + values[valuesById[4] = "CA"] = 4; + values[valuesById[5] = "CM"] = 5; + values[valuesById[6] = "CP"] = 6; + values[valuesById[7] = "IA"] = 7; + values[valuesById[8] = "IR"] = 8; + values[valuesById[9] = "MA"] = 9; + values[valuesById[10] = "MP"] = 10; + values[valuesById[11] = "PE"] = 11; + values[valuesById[12] = "PL"] = 12; + values[valuesById[13] = "PS"] = 13; + values[valuesById[14] = "RA"] = 14; + values[valuesById[15] = "SA"] = 15; + values[valuesById[16] = "SC"] = 16; + values[valuesById[17] = "SI"] = 17; + values[valuesById[18] = "SR"] = 18; + return values; + })(); + + return Control; })(); v1.ControlFamily = (function() { @@ -16505,6 +17218,7 @@ * @property {number} DEPLOYMENT_STATE_VALIDATING=1 DEPLOYMENT_STATE_VALIDATING value * @property {number} DEPLOYMENT_STATE_CREATING=2 DEPLOYMENT_STATE_CREATING value * @property {number} DEPLOYMENT_STATE_DELETING=3 DEPLOYMENT_STATE_DELETING value + * @property {number} DEPLOYMENT_STATE_UPDATING=8 DEPLOYMENT_STATE_UPDATING value * @property {number} DEPLOYMENT_STATE_FAILED=4 DEPLOYMENT_STATE_FAILED value * @property {number} DEPLOYMENT_STATE_READY=5 DEPLOYMENT_STATE_READY value * @property {number} DEPLOYMENT_STATE_PARTIALLY_DEPLOYED=6 DEPLOYMENT_STATE_PARTIALLY_DEPLOYED value @@ -16516,6 +17230,7 @@ values[valuesById[1] = "DEPLOYMENT_STATE_VALIDATING"] = 1; values[valuesById[2] = "DEPLOYMENT_STATE_CREATING"] = 2; values[valuesById[3] = "DEPLOYMENT_STATE_DELETING"] = 3; + values[valuesById[8] = "DEPLOYMENT_STATE_UPDATING"] = 8; values[valuesById[4] = "DEPLOYMENT_STATE_FAILED"] = 4; values[valuesById[5] = "DEPLOYMENT_STATE_READY"] = 5; values[valuesById[6] = "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED"] = 6; @@ -16865,6 +17580,7 @@ case 1: case 2: case 3: + case 8: case 4: case 5: case 6: @@ -16960,6 +17676,10 @@ case 3: message.deploymentState = 3; break; + case "DEPLOYMENT_STATE_UPDATING": + case 8: + message.deploymentState = 8; + break; case "DEPLOYMENT_STATE_FAILED": case 4: message.deploymentState = 4; @@ -17424,6 +18144,7 @@ case 1: case 2: case 3: + case 8: case 4: case 5: case 6: @@ -17514,6 +18235,10 @@ case 3: message.deploymentState = 3; break; + case "DEPLOYMENT_STATE_UPDATING": + case 8: + message.deploymentState = 8; + break; case "DEPLOYMENT_STATE_FAILED": case 4: message.deploymentState = 4; @@ -21618,6 +22343,22 @@ return values; })(); + /** + * FrameworkComplianceSummaryView enum. + * @name google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView + * @enum {number} + * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED=0 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED value + * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC=1 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC value + * @property {number} FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL=2 FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL value + */ + v1.FrameworkComplianceSummaryView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC"] = 1; + values[valuesById[2] = "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL"] = 2; + return values; + })(); + v1.ListFrameworkComplianceSummariesRequest = (function() { /** @@ -21628,6 +22369,7 @@ * @property {number|null} [pageSize] ListFrameworkComplianceSummariesRequest pageSize * @property {string|null} [pageToken] ListFrameworkComplianceSummariesRequest pageToken * @property {string|null} [filter] ListFrameworkComplianceSummariesRequest filter + * @property {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView|null} [view] ListFrameworkComplianceSummariesRequest view */ /** @@ -21677,6 +22419,14 @@ */ ListFrameworkComplianceSummariesRequest.prototype.filter = ""; + /** + * ListFrameworkComplianceSummariesRequest view. + * @member {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} view + * @memberof google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest + * @instance + */ + ListFrameworkComplianceSummariesRequest.prototype.view = 0; + /** * Creates a new ListFrameworkComplianceSummariesRequest instance using the specified properties. * @function create @@ -21709,6 +22459,8 @@ 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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); return writer; }; @@ -21761,6 +22513,10 @@ message.filter = reader.string(); break; } + case 5: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -21808,6 +22564,15 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -21831,6 +22596,26 @@ message.pageToken = String(object.pageToken); if (object.filter != null) message.filter = String(object.filter); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL": + case 2: + message.view = 2; + break; + } return message; }; @@ -21852,6 +22637,7 @@ object.pageSize = 0; object.pageToken = ""; object.filter = ""; + object.view = options.enums === String ? "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED" : 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -21861,6 +22647,8 @@ object.pageToken = message.pageToken; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView[message.view] === undefined ? message.view : $root.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView[message.view] : message.view; return object; }; @@ -22811,6 +23599,7 @@ * @interface IFetchFrameworkComplianceReportRequest * @property {string|null} [name] FetchFrameworkComplianceReportRequest name * @property {google.protobuf.ITimestamp|null} [endTime] FetchFrameworkComplianceReportRequest endTime + * @property {string|null} [filter] FetchFrameworkComplianceReportRequest filter */ /** @@ -22844,6 +23633,14 @@ */ FetchFrameworkComplianceReportRequest.prototype.endTime = null; + /** + * FetchFrameworkComplianceReportRequest filter. + * @member {string} filter + * @memberof google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest + * @instance + */ + FetchFrameworkComplianceReportRequest.prototype.filter = ""; + /** * Creates a new FetchFrameworkComplianceReportRequest instance using the specified properties. * @function create @@ -22872,6 +23669,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); return writer; }; @@ -22916,6 +23715,10 @@ message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 3: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22959,6 +23762,9 @@ if (error) return "endTime." + error; } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; @@ -22981,6 +23787,8 @@ throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.filter != null) + message.filter = String(object.filter); return message; }; @@ -23000,11 +23808,14 @@ if (options.defaults) { object.name = ""; object.endTime = null; + object.filter = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.endTime != null && message.hasOwnProperty("endTime")) object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; @@ -24917,6 +25728,8 @@ * @property {number|Long|null} [majorRevisionId] FrameworkComplianceSummary majorRevisionId * @property {number|Long|null} [minorRevisionId] FrameworkComplianceSummary minorRevisionId * @property {Array.|null} [targetResourceDetails] FrameworkComplianceSummary targetResourceDetails + * @property {number|Long|null} [findingCount] FrameworkComplianceSummary findingCount + * @property {google.cloud.cloudsecuritycompliance.v1.ITrend|null} [controlsPassingTrend] FrameworkComplianceSummary controlsPassingTrend */ /** @@ -25017,6 +25830,22 @@ */ FrameworkComplianceSummary.prototype.targetResourceDetails = $util.emptyArray; + /** + * FrameworkComplianceSummary findingCount. + * @member {number|Long} findingCount + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.findingCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FrameworkComplianceSummary controlsPassingTrend. + * @member {google.cloud.cloudsecuritycompliance.v1.ITrend|null|undefined} controlsPassingTrend + * @memberof google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary + * @instance + */ + FrameworkComplianceSummary.prototype.controlsPassingTrend = null; + /** * Creates a new FrameworkComplianceSummary instance using the specified properties. * @function create @@ -25070,6 +25899,10 @@ if (message.targetResourceDetails != null && message.targetResourceDetails.length) for (var i = 0; i < message.targetResourceDetails.length; ++i) $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.encode(message.targetResourceDetails[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.findingCount != null && Object.hasOwnProperty.call(message, "findingCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.findingCount); + if (message.controlsPassingTrend != null && Object.hasOwnProperty.call(message, "controlsPassingTrend")) + $root.google.cloud.cloudsecuritycompliance.v1.Trend.encode(message.controlsPassingTrend, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -25162,6 +25995,14 @@ message.targetResourceDetails.push($root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.decode(reader, reader.uint32())); break; } + case 11: { + message.findingCount = reader.int64(); + break; + } + case 12: { + message.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25265,6 +26106,14 @@ return "targetResourceDetails." + error; } } + if (message.findingCount != null && message.hasOwnProperty("findingCount")) + if (!$util.isInteger(message.findingCount) && !(message.findingCount && $util.isInteger(message.findingCount.low) && $util.isInteger(message.findingCount.high))) + return "findingCount: integer|Long expected"; + if (message.controlsPassingTrend != null && message.hasOwnProperty("controlsPassingTrend")) { + var error = $root.google.cloud.cloudsecuritycompliance.v1.Trend.verify(message.controlsPassingTrend); + if (error) + return "controlsPassingTrend." + error; + } return null; }; @@ -25405,6 +26254,20 @@ message.targetResourceDetails[i] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.fromObject(object.targetResourceDetails[i]); } } + if (object.findingCount != null) + if ($util.Long) + (message.findingCount = $util.Long.fromValue(object.findingCount)).unsigned = false; + else if (typeof object.findingCount === "string") + message.findingCount = parseInt(object.findingCount, 10); + else if (typeof object.findingCount === "number") + message.findingCount = object.findingCount; + else if (typeof object.findingCount === "object") + message.findingCount = new $util.LongBits(object.findingCount.low >>> 0, object.findingCount.high >>> 0).toNumber(); + if (object.controlsPassingTrend != null) { + if (typeof object.controlsPassingTrend !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary.controlsPassingTrend: object expected"); + message.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.fromObject(object.controlsPassingTrend); + } return message; }; @@ -25442,6 +26305,12 @@ object.minorRevisionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.minorRevisionId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.findingCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.findingCount = options.longs === String ? "0" : 0; + object.controlsPassingTrend = null; } if (message.framework != null && message.hasOwnProperty("framework")) object.framework = message.framework; @@ -25478,6 +26347,13 @@ for (var j = 0; j < message.targetResourceDetails.length; ++j) object.targetResourceDetails[j] = $root.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails.toObject(message.targetResourceDetails[j], options); } + if (message.findingCount != null && message.hasOwnProperty("findingCount")) + if (typeof message.findingCount === "number") + object.findingCount = options.longs === String ? String(message.findingCount) : message.findingCount; + else + object.findingCount = options.longs === String ? $util.Long.prototype.toString.call(message.findingCount) : options.longs === Number ? new $util.LongBits(message.findingCount.low >>> 0, message.findingCount.high >>> 0).toNumber() : message.findingCount; + if (message.controlsPassingTrend != null && message.hasOwnProperty("controlsPassingTrend")) + object.controlsPassingTrend = $root.google.cloud.cloudsecuritycompliance.v1.Trend.toObject(message.controlsPassingTrend, options); return object; }; @@ -28663,6 +29539,240 @@ return TargetResourceDetails; })(); + v1.Trend = (function() { + + /** + * Properties of a Trend. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @interface ITrend + * @property {google.protobuf.IDuration|null} [duration] Trend duration + * @property {number|null} [valuePercent] Trend valuePercent + */ + + /** + * Constructs a new Trend. + * @memberof google.cloud.cloudsecuritycompliance.v1 + * @classdesc Represents a Trend. + * @implements ITrend + * @constructor + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend=} [properties] Properties to set + */ + function Trend(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trend duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @instance + */ + Trend.prototype.duration = null; + + /** + * Trend valuePercent. + * @member {number} valuePercent + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @instance + */ + Trend.prototype.valuePercent = 0; + + /** + * Creates a new Trend instance using the specified properties. + * @function create + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend=} [properties] Properties to set + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend instance + */ + Trend.create = function create(properties) { + return new Trend(properties); + }; + + /** + * Encodes the specified Trend message. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @function encode + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend} message Trend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.valuePercent != null && Object.hasOwnProperty.call(message, "valuePercent")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.valuePercent); + return writer; + }; + + /** + * Encodes the specified Trend message, length delimited. Does not implicitly {@link google.cloud.cloudsecuritycompliance.v1.Trend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.ITrend} message Trend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trend message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trend.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.cloudsecuritycompliance.v1.Trend(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.valuePercent = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trend message. + * @function verify + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.valuePercent != null && message.hasOwnProperty("valuePercent")) + if (typeof message.valuePercent !== "number") + return "valuePercent: number expected"; + return null; + }; + + /** + * Creates a Trend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.cloudsecuritycompliance.v1.Trend} Trend + */ + Trend.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.cloudsecuritycompliance.v1.Trend) + return object; + var message = new $root.google.cloud.cloudsecuritycompliance.v1.Trend(); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.cloudsecuritycompliance.v1.Trend.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.valuePercent != null) + message.valuePercent = Number(object.valuePercent); + return message; + }; + + /** + * Creates a plain object from a Trend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {google.cloud.cloudsecuritycompliance.v1.Trend} message Trend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.duration = null; + object.valuePercent = 0; + } + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.valuePercent != null && message.hasOwnProperty("valuePercent")) + object.valuePercent = options.json && !isFinite(message.valuePercent) ? String(message.valuePercent) : message.valuePercent; + return object; + }; + + /** + * Converts this Trend to JSON. + * @function toJSON + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @instance + * @returns {Object.} JSON object + */ + Trend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trend + * @function getTypeUrl + * @memberof google.cloud.cloudsecuritycompliance.v1.Trend + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.cloudsecuritycompliance.v1.Trend"; + }; + + return Trend; + })(); + return v1; })(); diff --git a/packages/google-cloud-cloudsecuritycompliance/protos/protos.json b/packages/google-cloud-cloudsecuritycompliance/protos/protos.json index 1e06d3fb2aa..a18874f53aa 100644 --- a/packages/google-cloud-cloudsecuritycompliance/protos/protos.json +++ b/packages/google-cloud-cloudsecuritycompliance/protos/protos.json @@ -778,7 +778,11 @@ "CC_CATEGORY_LEGAL_AND_DISCLOSURES": 12, "CC_CATEGORY_VULNERABILITY_MANAGEMENT": 13, "CC_CATEGORY_PRIVACY": 14, - "CC_CATEGORY_BCDR": 15 + "CC_CATEGORY_BCDR": 15, + "CC_CATEGORY_ADMIN_ACCESS": 16, + "CC_CATEGORY_DATA_RESIDENCY": 17, + "CC_CATEGORY_RESOURCE_USAGE_RESTRICTION": 18, + "CC_CATEGORY_SERVICE_SPECIFIC": 19 } }, "CloudProvider": { @@ -818,7 +822,7 @@ "Framework": { "options": { "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/Framework", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworks/{framework}", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/frameworks/{framework}", "(google.api.resource).plural": "frameworks", "(google.api.resource).singular": "framework" }, @@ -948,7 +952,8 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudsecuritycompliance.googleapis.com/Framework" } }, "majorRevisionId": { @@ -982,7 +987,7 @@ "CloudControl": { "options": { "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CloudControl", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/cloudControls/{cloud_control}", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/cloudControls/{cloud_control}", "(google.api.resource).plural": "cloudControls", "(google.api.resource).singular": "cloudControl" }, @@ -1284,23 +1289,38 @@ "fields": { "stringValue": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "boolValue": { "type": "bool", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "stringListValue": { "type": "StringList", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "numberValue": { "type": "double", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "oneofValue": { "type": "Parameter", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1445,6 +1465,133 @@ } } }, + "Control": { + "options": { + "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/Control", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/controls/{control}", + "(google.api.resource).plural": "controls", + "(google.api.resource).singular": "control" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "family": { + "type": "Family", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlFamily": { + "type": "ControlFamily", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "responsibilityType": { + "type": "RegulatoryControlResponsibilityType", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "googleResponsibilityDescription": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "googleResponsibilityImplementation": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerResponsibilityDescription": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerResponsibilityImplementation": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sharedResponsibilityDescription": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "additionalContentUri": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "relatedFrameworks": { + "rule": "repeated", + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Family": { + "values": { + "FAMILY_UNSPECIFIED": 0, + "AC": 1, + "AT": 2, + "AU": 3, + "CA": 4, + "CM": 5, + "CP": 6, + "IA": 7, + "IR": 8, + "MA": 9, + "MP": 10, + "PE": 11, + "PL": 12, + "PS": 13, + "RA": 14, + "SA": 15, + "SC": 16, + "SI": 17, + "SR": 18 + } + } + } + }, "ControlFamily": { "fields": { "familyId": { @@ -1633,12 +1780,16 @@ "responseType": "ListFrameworksResponse", "options": { "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworks", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworks", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/frameworks" + "get": "/v1/{parent=organizations/*/locations/*}/frameworks", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/frameworks" + } } }, { @@ -1651,12 +1802,16 @@ "responseType": "Framework", "options": { "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworks/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/frameworks/*}" + "get": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/frameworks/*}" + } } }, { @@ -1670,13 +1825,19 @@ "options": { "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworks", "(google.api.http).body": "framework", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworks", + "(google.api.http).additional_bindings.body": "framework", "(google.api.method_signature)": "parent,framework,framework_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{parent=organizations/*/locations/*}/frameworks", - "body": "framework" + "body": "framework", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/frameworks", + "body": "framework" + } } }, { @@ -1690,13 +1851,19 @@ "options": { "(google.api.http).patch": "/v1/{framework.name=organizations/*/locations/*/frameworks/*}", "(google.api.http).body": "framework", + "(google.api.http).additional_bindings.patch": "/v1/{framework.name=projects/*/locations/*/frameworks/*}", + "(google.api.http).additional_bindings.body": "framework", "(google.api.method_signature)": "framework,update_mask" }, "parsedOptions": [ { "(google.api.http)": { "patch": "/v1/{framework.name=organizations/*/locations/*/frameworks/*}", - "body": "framework" + "body": "framework", + "additional_bindings": { + "patch": "/v1/{framework.name=projects/*/locations/*/frameworks/*}", + "body": "framework" + } } }, { @@ -1709,12 +1876,16 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/frameworks/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/{name=organizations/*/locations/*/frameworks/*}" + "delete": "/v1/{name=organizations/*/locations/*/frameworks/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/frameworks/*}" + } } }, { @@ -1727,12 +1898,16 @@ "responseType": "ListCloudControlsResponse", "options": { "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/cloudControls", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/cloudControls", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/cloudControls" + "get": "/v1/{parent=organizations/*/locations/*}/cloudControls", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/cloudControls" + } } }, { @@ -1745,12 +1920,16 @@ "responseType": "CloudControl", "options": { "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cloudControls/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/cloudControls/*}" + "get": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/cloudControls/*}" + } } }, { @@ -1764,13 +1943,19 @@ "options": { "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/cloudControls", "(google.api.http).body": "cloud_control", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/cloudControls", + "(google.api.http).additional_bindings.body": "cloud_control", "(google.api.method_signature)": "parent,cloud_control,cloud_control_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{parent=organizations/*/locations/*}/cloudControls", - "body": "cloud_control" + "body": "cloud_control", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/cloudControls", + "body": "cloud_control" + } } }, { @@ -1784,13 +1969,19 @@ "options": { "(google.api.http).patch": "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}", "(google.api.http).body": "cloud_control", + "(google.api.http).additional_bindings.patch": "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}", + "(google.api.http).additional_bindings.body": "cloud_control", "(google.api.method_signature)": "cloud_control,update_mask" }, "parsedOptions": [ { "(google.api.http)": { "patch": "/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}", - "body": "cloud_control" + "body": "cloud_control", + "additional_bindings": { + "patch": "/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}", + "body": "cloud_control" + } } }, { @@ -1803,12 +1994,16 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/cloudControls/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/{name=organizations/*/locations/*/cloudControls/*}" + "delete": "/v1/{name=organizations/*/locations/*/cloudControls/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/cloudControls/*}" + } } }, { @@ -2065,6 +2260,8 @@ "options": { "(google.api.http).post": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", "(google.api.http).body": "framework_deployment", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", + "(google.api.http).additional_bindings.body": "framework_deployment", "(google.api.method_signature)": "parent,framework_deployment,framework_deployment_id", "(google.longrunning.operation_info).response_type": "FrameworkDeployment", "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" @@ -2073,7 +2270,11 @@ { "(google.api.http)": { "post": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", - "body": "framework_deployment" + "body": "framework_deployment", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", + "body": "framework_deployment" + } } }, { @@ -2092,6 +2293,7 @@ "responseType": "google.longrunning.Operation", "options": { "(google.api.http).delete": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "google.cloud.cloudsecuritycompliance.v1.OperationMetadata" @@ -2099,7 +2301,10 @@ "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" + "delete": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } } }, { @@ -2118,12 +2323,16 @@ "responseType": "FrameworkDeployment", "options": { "(google.api.http).get": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}" + "get": "/v1/{name=organizations/*/locations/*/frameworkDeployments/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/frameworkDeployments/*}" + } } }, { @@ -2136,12 +2345,16 @@ "responseType": "ListFrameworkDeploymentsResponse", "options": { "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/frameworkDeployments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments" + "get": "/v1/{parent=organizations/*/locations/*}/frameworkDeployments", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/frameworkDeployments" + } } }, { @@ -2154,12 +2367,16 @@ "responseType": "CloudControlDeployment", "options": { "(google.api.http).get": "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}" + "get": "/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/cloudControlDeployments/*}" + } } }, { @@ -2172,12 +2389,16 @@ "responseType": "ListCloudControlDeploymentsResponse", "options": { "(google.api.http).get": "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/cloudControlDeployments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments" + "get": "/v1/{parent=organizations/*/locations/*}/cloudControlDeployments", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/cloudControlDeployments" + } } }, { @@ -2193,6 +2414,7 @@ "DEPLOYMENT_STATE_VALIDATING": 1, "DEPLOYMENT_STATE_CREATING": 2, "DEPLOYMENT_STATE_DELETING": 3, + "DEPLOYMENT_STATE_UPDATING": 8, "DEPLOYMENT_STATE_FAILED": 4, "DEPLOYMENT_STATE_READY": 5, "DEPLOYMENT_STATE_PARTIALLY_DEPLOYED": 6, @@ -2202,7 +2424,7 @@ "FrameworkDeployment": { "options": { "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/FrameworkDeployment", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}", "(google.api.resource).plural": "frameworkDeployments", "(google.api.resource).singular": "frameworkDeployment" }, @@ -2298,7 +2520,7 @@ "CloudControlDeployment": { "options": { "(google.api.resource).type": "cloudsecuritycompliance.googleapis.com/CloudControlDeployment", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}", "(google.api.resource).plural": "cloudControlDeployments", "(google.api.resource).singular": "cloudControlDeployment" }, @@ -2881,6 +3103,13 @@ "CHOKEPOINT": 9 } }, + "FrameworkComplianceSummaryView": { + "values": { + "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED": 0, + "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC": 1, + "FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL": 2 + } + }, "ListFrameworkComplianceSummariesRequest": { "fields": { "parent": { @@ -2911,6 +3140,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "view": { + "type": "FrameworkComplianceSummaryView", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -3016,6 +3252,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "filter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -3244,6 +3487,20 @@ "rule": "repeated", "type": "TargetResourceDetails", "id": 10 + }, + "findingCount": { + "type": "int64", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlsPassingTrend": { + "type": "Trend", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -3517,6 +3774,24 @@ "id": 7 } } + }, + "Trend": { + "fields": { + "duration": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "valuePercent": { + "type": "double", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } } } } diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js index a27751c3bf3..ba921be782e 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_cloud_control.js @@ -29,8 +29,9 @@ function main(parent, cloudControlId, cloudControl) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}`. + * - `projects/{project}/locations/{location}`. * The only supported location is `global`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js index fb75d0fc7ed..01b7f00be2c 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.create_framework.js @@ -29,8 +29,9 @@ function main(parent, frameworkId, framework) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. * The only supported location is `global`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js index 04efe415122..341e9f4f6a7 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_cloud_control.js @@ -29,8 +29,11 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the cloud control to delete, in the format - * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`. + * Required. The name of the cloud control to delete, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + * or + * `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. * The only supported location is `global`. */ // const name = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js index 17fe4ed3426..103c52a4a93 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.delete_framework.js @@ -29,8 +29,10 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the resource, in the format - * `organizations/{organization}/locations/{location}/frameworks/{framework}`. + * Required. The name of the resource, in one of the following formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. * The only supported location is `global`. */ // const name = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js index 29955d50b42..cb9b86d8382 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_cloud_control.js @@ -29,8 +29,11 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the cloud control to retrieve, in the format - * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`. + * Required. The name of the cloud control to retrieve, in one of the + * following formats: + * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + * or + * `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. * The only supported location is `global`. */ // const name = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js index 1ef1174ee9a..3c883cf3035 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.get_framework.js @@ -29,8 +29,11 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the framework to retrieve, in the format - * `organizations/{organization}/locations/{location}/frameworks/{framework_id}` + * Required. The name of the framework to retrieve, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. * The only supported location is `global`. */ // const name = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js index d16665ecaa7..b6888455f71 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_cloud_controls.js @@ -29,8 +29,9 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. * The only supported location is `global`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js index 9104ed928d9..f37c2a647dc 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/config.list_frameworks.js @@ -29,8 +29,9 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. * The only supported location is `global`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js index 09716ce2294..6d1895cfa54 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.create_framework_deployment.js @@ -30,7 +30,9 @@ function main(parent, frameworkDeployment) { */ /** * Required. The parent resource of the framework deployment in the format - * `organizations/{organization}/locations/{location}`. + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. * Only the global location is supported. */ // const parent = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js index a43adaac23e..061be6c79d5 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.delete_framework_deployment.js @@ -31,7 +31,9 @@ function main(name) { /** * Required. The name of the framework deployment that you want to delete, * in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. * The only supported location is `global`. */ // const name = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js index f822f746781..5700b2100de 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_cloud_control_deployment.js @@ -30,7 +30,9 @@ function main(name) { */ /** * Required. The name for the cloud control deployment, in the format - * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + * or + * `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. * The only supported location is `global`. */ // const name = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js index faec1c1970c..8bd828cc6a7 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.get_framework_deployment.js @@ -30,7 +30,9 @@ function main(name) { */ /** * Required. The name of the framework deployment, in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. * The only supported location is `global`. */ // const name = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js index 56702d12dd8..3b79a1db407 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_cloud_control_deployments.js @@ -30,8 +30,9 @@ function main(parent) { */ /** * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}`. The only - * supported location is `global`. + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js index 2e562170427..df8505aaffd 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/deployment.list_framework_deployments.js @@ -30,7 +30,9 @@ function main(parent) { */ /** * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}`. + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. * The only supported location is `global`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js index dc674c028db..15537e784c6 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.fetch_framework_compliance_report.js @@ -36,6 +36,10 @@ function main(name) { * Optional. The end time of the report. */ // const endTime = {} + /** + * Optional. The filtering results. + */ + // const filter = 'abc123' // Imports the Cloudsecuritycompliance library const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js index 2c43ee380c9..b93c05a9230 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/monitoring.list_framework_compliance_summaries.js @@ -46,6 +46,10 @@ function main(parent) { * Optional. The filtering results. */ // const filter = 'abc123' + /** + * Optional. Specifies the level of detail to return in the response. + */ + // const view = {} // Imports the Cloudsecuritycompliance library const {MonitoringClient} = require('@google-cloud/cloudsecuritycompliance').v1; diff --git a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json index 044c7dcaed4..c60712c3a15 100644 --- a/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json +++ b/packages/google-cloud-cloudsecuritycompliance/samples/generated/v1/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json @@ -294,7 +294,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 70, "type": "FULL" } ], @@ -342,7 +342,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -386,7 +386,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 67, "type": "FULL" } ], @@ -482,7 +482,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 57, "type": "FULL" } ], @@ -522,7 +522,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 74, "type": "FULL" } ], @@ -570,7 +570,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -614,7 +614,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 68, "type": "FULL" } ], @@ -706,7 +706,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -746,7 +746,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 69, "type": "FULL" } ], @@ -794,7 +794,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 68, "type": "FULL" } ], @@ -838,7 +838,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 57, "type": "FULL" } ], @@ -878,7 +878,7 @@ "segments": [ { "start": 25, - "end": 81, + "end": 83, "type": "FULL" } ], @@ -934,7 +934,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 57, "type": "FULL" } ], @@ -974,7 +974,7 @@ "segments": [ { "start": 25, - "end": 81, + "end": 82, "type": "FULL" } ], @@ -1030,7 +1030,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 73, "type": "FULL" } ], @@ -1054,6 +1054,10 @@ { "name": "filter", "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView" } ], "resultType": ".google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse", @@ -1138,7 +1142,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 61, "type": "FULL" } ], @@ -1154,6 +1158,10 @@ { "name": "end_time", "type": ".google.protobuf.Timestamp" + }, + { + "name": "filter", + "type": "TYPE_STRING" } ], "resultType": ".google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport", diff --git a/packages/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts b/packages/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts index 44306d945d0..ef8d67c8ff4 100644 --- a/packages/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts +++ b/packages/google-cloud-cloudsecuritycompliance/src/v1/audit_client.ts @@ -184,12 +184,6 @@ export class AuditClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { - cloudControlPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - cloudControlDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -202,18 +196,21 @@ export class AuditClient { folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), - frameworkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - frameworkDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/cmEnrollment' ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -232,12 +229,27 @@ export class AuditClient { organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/cmEnrollment' ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -256,6 +268,12 @@ export class AuditClient { projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), }; // Some of the methods on this service return "paged" results, @@ -276,7 +294,13 @@ export class AuditClient { }; if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',}]; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}',}], + },{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',additional_bindings: [{get: '/v1/{name=projects/*}/locations',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}/operations',}], + }]; } this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); const createFrameworkAuditResponse = protoFilesRoot.lookup( @@ -1309,104 +1333,6 @@ export class AuditClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified cloudControl resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - cloudControlPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.cloudControlPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).organization; - } - - /** - * Parse the location from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).location; - } - - /** - * Parse the cloud_control from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).cloud_control; - } - - /** - * Return a fully-qualified cloudControlDeployment resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - cloudControlDeploymentPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).organization; - } - - /** - * Parse the location from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).location; - } - - /** - * Parse the cloud_control_deployment from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).cloud_control_deployment; - } - /** * Return a fully-qualified folderLocationFindingSummaries resource name string. * @@ -1617,137 +1543,137 @@ export class AuditClient { } /** - * Return a fully-qualified framework resource name string. + * Return a fully-qualified location resource name string. * - * @param {string} organization + * @param {string} project * @param {string} location - * @param {string} framework * @returns {string} Resource name string. */ - frameworkPath(organization:string,location:string,framework:string) { - return this.pathTemplates.frameworkPathTemplate.render({ - organization: organization, + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, location: location, - framework: framework, }); } /** - * Parse the organization from Framework resource. + * Parse the project from Location resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the organization. + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. */ - matchOrganizationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).organization; + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; } /** - * Parse the location from Framework resource. + * Parse the location from Location resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. + * @param {string} locationName + * A fully-qualified path representing Location resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).location; - } - - /** - * Parse the framework from Framework resource. - * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).framework; + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; } /** - * Return a fully-qualified frameworkDeployment resource name string. + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. * * @param {string} organization * @param {string} location - * @param {string} framework_deployment + * @param {string} cloud_control_deployment * @returns {string} Resource name string. */ - frameworkDeploymentPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.render({ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ organization: organization, location: location, - framework_deployment: frameworkDeployment, + cloud_control_deployment: cloudControlDeployment, }); } /** - * Parse the organization from FrameworkDeployment resource. + * Parse the organization from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).organization; + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; } /** - * Parse the location from FrameworkDeployment resource. + * Parse the location from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).location; + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; } /** - * Parse the framework_deployment from FrameworkDeployment resource. + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. - * @returns {string} A string representing the framework_deployment. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. */ - matchFrameworkDeploymentFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).framework_deployment; + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; } /** - * Return a fully-qualified location resource name string. + * Return a fully-qualified organizationLocationCloudControls resource name string. * - * @param {string} project + * @param {string} organization * @param {string} location + * @param {string} cloud_control * @returns {string} Resource name string. */ - locationPath(project:string,location:string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ + organization: organization, location: location, + cloud_control: cloudControl, }); } /** - * Parse the project from Location resource. + * Parse the organization from OrganizationLocationCloudControls resource. * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the organization. */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; } /** - * Parse the location from Location resource. + * Parse the location from OrganizationLocationCloudControls resource. * - * @param {string} locationName - * A fully-qualified path representing Location resource. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. * @returns {string} A string representing the location. */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; } /** @@ -1786,6 +1712,55 @@ export class AuditClient { return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + /** * Return a fully-qualified organizationLocationFindingSummaries resource name string. * @@ -2093,6 +2068,104 @@ export class AuditClient { return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + /** * Return a fully-qualified project resource name string. * @@ -2116,6 +2189,104 @@ export class AuditClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + /** * Return a fully-qualified projectLocationCmEnrollment resource name string. * @@ -2152,6 +2323,55 @@ export class AuditClient { return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + /** * Return a fully-qualified projectLocationFindingSummaries resource name string. * @@ -2459,6 +2679,104 @@ export class AuditClient { return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts b/packages/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts index 4a2c4475e33..4424c6801d2 100644 --- a/packages/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts +++ b/packages/google-cloud-cloudsecuritycompliance/src/v1/cm_enrollment_service_client.ts @@ -184,12 +184,6 @@ export class CmEnrollmentServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { - cloudControlPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - cloudControlDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -202,15 +196,18 @@ export class CmEnrollmentServiceClient { folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), - frameworkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' ), - frameworkDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' ), organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/cmEnrollment' ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -229,9 +226,24 @@ export class CmEnrollmentServiceClient { organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/cmEnrollment' ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -250,6 +262,12 @@ export class CmEnrollmentServiceClient { projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), }; // Put together the default options sent with requests. @@ -683,104 +701,6 @@ export class CmEnrollmentServiceClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified cloudControl resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - cloudControlPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.cloudControlPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).organization; - } - - /** - * Parse the location from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).location; - } - - /** - * Parse the cloud_control from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).cloud_control; - } - - /** - * Return a fully-qualified cloudControlDeployment resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - cloudControlDeploymentPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).organization; - } - - /** - * Parse the location from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).location; - } - - /** - * Parse the cloud_control_deployment from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).cloud_control_deployment; - } - /** * Return a fully-qualified folderLocationFindingSummaries resource name string. * @@ -991,101 +911,101 @@ export class CmEnrollmentServiceClient { } /** - * Return a fully-qualified framework resource name string. + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. * * @param {string} organization * @param {string} location - * @param {string} framework + * @param {string} cloud_control_deployment * @returns {string} Resource name string. */ - frameworkPath(organization:string,location:string,framework:string) { - return this.pathTemplates.frameworkPathTemplate.render({ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ organization: organization, location: location, - framework: framework, + cloud_control_deployment: cloudControlDeployment, }); } /** - * Parse the organization from Framework resource. + * Parse the organization from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).organization; + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; } /** - * Parse the location from Framework resource. + * Parse the location from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).location; + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; } /** - * Parse the framework from Framework resource. + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the framework. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. */ - matchFrameworkFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).framework; + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; } /** - * Return a fully-qualified frameworkDeployment resource name string. + * Return a fully-qualified organizationLocationCloudControls resource name string. * * @param {string} organization * @param {string} location - * @param {string} framework_deployment + * @param {string} cloud_control * @returns {string} Resource name string. */ - frameworkDeploymentPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.render({ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ organization: organization, location: location, - framework_deployment: frameworkDeployment, + cloud_control: cloudControl, }); } /** - * Parse the organization from FrameworkDeployment resource. + * Parse the organization from OrganizationLocationCloudControls resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).organization; + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; } /** - * Parse the location from FrameworkDeployment resource. + * Parse the location from OrganizationLocationCloudControls resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).location; + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; } /** - * Parse the framework_deployment from FrameworkDeployment resource. + * Parse the cloud_control from OrganizationLocationCloudControls resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. - * @returns {string} A string representing the framework_deployment. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. */ - matchFrameworkDeploymentFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).framework_deployment; + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; } /** @@ -1124,6 +1044,55 @@ export class CmEnrollmentServiceClient { return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + /** * Return a fully-qualified organizationLocationFindingSummaries resource name string. * @@ -1431,6 +1400,202 @@ export class CmEnrollmentServiceClient { return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + /** * Return a fully-qualified projectLocationCmEnrollment resource name string. * @@ -1467,6 +1632,55 @@ export class CmEnrollmentServiceClient { return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + /** * Return a fully-qualified projectLocationFindingSummaries resource name string. * @@ -1774,6 +1988,104 @@ export class CmEnrollmentServiceClient { return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts b/packages/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts index 45412902279..ae9357e3240 100644 --- a/packages/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts +++ b/packages/google-cloud-cloudsecuritycompliance/src/v1/config_client.ts @@ -184,12 +184,6 @@ export class ConfigClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { - cloudControlPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - cloudControlDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -202,21 +196,24 @@ export class ConfigClient { folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), - frameworkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - frameworkDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), organizationPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}' ), organizationLocationPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}' ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/cmEnrollment' ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -235,9 +232,24 @@ export class ConfigClient { organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/cmEnrollment' ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -256,6 +268,12 @@ export class ConfigClient { projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), }; // Some of the methods on this service return "paged" results, @@ -424,8 +442,12 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the framework to retrieve, in the format - * `organizations/{organization}/locations/{location}/frameworks/{framework_id}` + * Required. The name of the framework to retrieve, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. + * * The only supported location is `global`. * @param {number} [request.majorRevisionId] * Optional. The framework major version to retrieve. If not specified, the @@ -525,8 +547,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {string} request.frameworkId * Required. The identifier (ID) of the framework. The ID is not the full name @@ -745,8 +769,11 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the resource, in the format - * `organizations/{organization}/locations/{location}/frameworks/{framework}`. + * Required. The name of the resource, in one of the following formats: + * `organizations/{organization}/locations/{location}/frameworks/{framework}` + * or + * `projects/{project}/locations/{location}/frameworks/{framework}`. + * * The only supported location is `global`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -847,8 +874,12 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the cloud control to retrieve, in the format - * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`. + * Required. The name of the cloud control to retrieve, in one of the + * following formats: + * `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + * or + * `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + * * The only supported location is `global`. * @param {number} [request.majorRevisionId] * Optional. The major version of the cloud control to retrieve. If not @@ -949,8 +980,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}`. + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {string} request.cloudControlId * Required. The identifier for the cloud control, which is the last segment @@ -1178,8 +1211,12 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the cloud control to delete, in the format - * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`. + * Required. The name of the cloud control to delete, in one of the following + * formats: + * `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + * or + * `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + * * The only supported location is `global`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1278,8 +1315,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The maximum number of frameworks to return. The default value is @@ -1383,8 +1422,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The maximum number of frameworks to return. The default value is @@ -1437,8 +1478,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The maximum number of frameworks to return. The default value is @@ -1493,8 +1536,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The maximum number of cloud controls to return. The default value @@ -1603,8 +1648,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The maximum number of cloud controls to return. The default value @@ -1662,8 +1709,10 @@ export class ConfigClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, in the format - * `organizations/{organization}/locations/{location}`. + * Required. The parent resource name, in one of the following formats: + * - `organizations/{organization}/locations/{location}` + * - `projects/{project}/locations/{location}`. + * * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The maximum number of cloud controls to return. The default value @@ -1796,104 +1845,6 @@ export class ConfigClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified cloudControl resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - cloudControlPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.cloudControlPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).organization; - } - - /** - * Parse the location from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).location; - } - - /** - * Parse the cloud_control from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).cloud_control; - } - - /** - * Return a fully-qualified cloudControlDeployment resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - cloudControlDeploymentPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).organization; - } - - /** - * Parse the location from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).location; - } - - /** - * Parse the cloud_control_deployment from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).cloud_control_deployment; - } - /** * Return a fully-qualified folderLocationFindingSummaries resource name string. * @@ -2104,160 +2055,160 @@ export class ConfigClient { } /** - * Return a fully-qualified framework resource name string. + * Return a fully-qualified organization resource name string. * * @param {string} organization - * @param {string} location - * @param {string} framework * @returns {string} Resource name string. */ - frameworkPath(organization:string,location:string,framework:string) { - return this.pathTemplates.frameworkPathTemplate.render({ + organizationPath(organization:string) { + return this.pathTemplates.organizationPathTemplate.render({ organization: organization, - location: location, - framework: framework, }); } /** - * Parse the organization from Framework resource. + * Parse the organization from Organization resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. + * @param {string} organizationName + * A fully-qualified path representing Organization resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).organization; + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; } /** - * Parse the location from Framework resource. + * Return a fully-qualified organizationLocation resource name string. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the location. + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. */ - matchLocationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).location; + organizationLocationPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationPathTemplate.render({ + organization: organization, + location: location, + }); } /** - * Parse the framework from Framework resource. + * Parse the organization from OrganizationLocation resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the framework. + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the organization. */ - matchFrameworkFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).framework; + matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; } /** - * Return a fully-qualified frameworkDeployment resource name string. + * Parse the location from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; + } + + /** + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. * * @param {string} organization * @param {string} location - * @param {string} framework_deployment + * @param {string} cloud_control_deployment * @returns {string} Resource name string. */ - frameworkDeploymentPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.render({ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ organization: organization, location: location, - framework_deployment: frameworkDeployment, + cloud_control_deployment: cloudControlDeployment, }); } /** - * Parse the organization from FrameworkDeployment resource. + * Parse the organization from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).organization; + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; } /** - * Parse the location from FrameworkDeployment resource. + * Parse the location from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).location; + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; } /** - * Parse the framework_deployment from FrameworkDeployment resource. + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. - * @returns {string} A string representing the framework_deployment. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. */ - matchFrameworkDeploymentFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).framework_deployment; + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; } /** - * Return a fully-qualified organization resource name string. + * Return a fully-qualified organizationLocationCloudControls resource name string. * * @param {string} organization + * @param {string} location + * @param {string} cloud_control * @returns {string} Resource name string. */ - organizationPath(organization:string) { - return this.pathTemplates.organizationPathTemplate.render({ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ organization: organization, + location: location, + cloud_control: cloudControl, }); } /** - * Parse the organization from Organization resource. + * Parse the organization from OrganizationLocationCloudControls resource. * - * @param {string} organizationName - * A fully-qualified path representing Organization resource. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromOrganizationName(organizationName: string) { - return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; - } - - /** - * Return a fully-qualified organizationLocation resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationPathTemplate.render({ - organization: organization, - location: location, - }); + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; } /** - * Parse the organization from OrganizationLocation resource. + * Parse the location from OrganizationLocationCloudControls resource. * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the organization. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the location. */ - matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; } /** - * Parse the location from OrganizationLocation resource. + * Parse the cloud_control from OrganizationLocationCloudControls resource. * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the location. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. */ - matchLocationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; } /** @@ -2296,6 +2247,55 @@ export class ConfigClient { return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + /** * Return a fully-qualified organizationLocationFindingSummaries resource name string. * @@ -2603,6 +2603,202 @@ export class ConfigClient { return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + /** * Return a fully-qualified projectLocationCmEnrollment resource name string. * @@ -2639,6 +2835,55 @@ export class ConfigClient { return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + /** * Return a fully-qualified projectLocationFindingSummaries resource name string. * @@ -2946,6 +3191,104 @@ export class ConfigClient { return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts b/packages/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts index 31130cdfa4f..b7dba1fd676 100644 --- a/packages/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts +++ b/packages/google-cloud-cloudsecuritycompliance/src/v1/deployment_client.ts @@ -185,12 +185,6 @@ export class DeploymentClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { - cloudControlPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - cloudControlDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -203,21 +197,24 @@ export class DeploymentClient { folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), - frameworkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - frameworkDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), organizationPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}' ), organizationLocationPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}' ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/cmEnrollment' ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -236,9 +233,24 @@ export class DeploymentClient { organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/cmEnrollment' ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -257,6 +269,12 @@ export class DeploymentClient { projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), }; // Some of the methods on this service return "paged" results, @@ -279,7 +297,13 @@ export class DeploymentClient { }; if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',}]; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=organizations/*/locations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}',}], + },{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=organizations/*}/locations',additional_bindings: [{get: '/v1/{name=projects/*}/locations',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=organizations/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=projects/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=organizations/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=projects/*/locations/*}/operations',}], + }]; } this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); const createFrameworkDeploymentResponse = protoFilesRoot.lookup( @@ -456,7 +480,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.name * Required. The name of the framework deployment, in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. * The only supported location is `global`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -552,7 +578,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.name * Required. The name for the cloud control deployment, in the format - * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + * `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + * or + * `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. * The only supported location is `global`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -652,7 +680,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource of the framework deployment in the format - * `organizations/{organization}/locations/{location}`. + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. * Only the global location is supported. * @param {string} [request.frameworkDeploymentId] * Optional. An identifier for the framework deployment that's unique in scope @@ -768,7 +798,9 @@ export class DeploymentClient { * @param {string} request.name * Required. The name of the framework deployment that you want to delete, * in the format - * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + * `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + * or + * `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. * The only supported location is `global`. * @param {string} [request.etag] * Optional. An opaque identifier for the current version of the resource. @@ -886,7 +918,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}`. + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The requested page size. The server might return fewer items than @@ -1000,7 +1034,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}`. + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The requested page size. The server might return fewer items than @@ -1063,7 +1099,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource of the framework deployment, in the format - * `organizations/{organization}/locations/{location}`. + * `organizations/{organization}/locations/{location}` + * or + * `projects/{project}/locations/{location}`. * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The requested page size. The server might return fewer items than @@ -1125,8 +1163,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}`. The only - * supported location is `global`. + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The requested page size. The server might return fewer items than * you requested. @@ -1239,8 +1278,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}`. The only - * supported location is `global`. + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The requested page size. The server might return fewer items than * you requested. @@ -1302,8 +1342,9 @@ export class DeploymentClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource for the cloud control deployment, in the - * format `organizations/{organization}/locations/{location}`. The only - * supported location is `global`. + * format `organizations/{organization}/locations/{location}` or + * `projects/{project}/locations/{location}`. + * The only supported location is `global`. * @param {number} [request.pageSize] * Optional. The requested page size. The server might return fewer items than * you requested. @@ -1663,104 +1704,6 @@ export class DeploymentClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified cloudControl resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - cloudControlPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.cloudControlPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).organization; - } - - /** - * Parse the location from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).location; - } - - /** - * Parse the cloud_control from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).cloud_control; - } - - /** - * Return a fully-qualified cloudControlDeployment resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - cloudControlDeploymentPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).organization; - } - - /** - * Parse the location from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).location; - } - - /** - * Parse the cloud_control_deployment from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).cloud_control_deployment; - } - /** * Return a fully-qualified folderLocationFindingSummaries resource name string. * @@ -1971,160 +1914,160 @@ export class DeploymentClient { } /** - * Return a fully-qualified framework resource name string. + * Return a fully-qualified organization resource name string. * * @param {string} organization - * @param {string} location - * @param {string} framework * @returns {string} Resource name string. */ - frameworkPath(organization:string,location:string,framework:string) { - return this.pathTemplates.frameworkPathTemplate.render({ + organizationPath(organization:string) { + return this.pathTemplates.organizationPathTemplate.render({ organization: organization, - location: location, - framework: framework, }); } /** - * Parse the organization from Framework resource. + * Parse the organization from Organization resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. + * @param {string} organizationName + * A fully-qualified path representing Organization resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).organization; + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; } /** - * Parse the location from Framework resource. + * Return a fully-qualified organizationLocation resource name string. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the location. + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. */ - matchLocationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).location; + organizationLocationPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationPathTemplate.render({ + organization: organization, + location: location, + }); } /** - * Parse the framework from Framework resource. + * Parse the organization from OrganizationLocation resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the framework. + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; + } + + /** + * Parse the location from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the location. */ - matchFrameworkFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).framework; + matchLocationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; } /** - * Return a fully-qualified frameworkDeployment resource name string. + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. * * @param {string} organization * @param {string} location - * @param {string} framework_deployment + * @param {string} cloud_control_deployment * @returns {string} Resource name string. */ - frameworkDeploymentPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.render({ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ organization: organization, location: location, - framework_deployment: frameworkDeployment, + cloud_control_deployment: cloudControlDeployment, }); } /** - * Parse the organization from FrameworkDeployment resource. + * Parse the organization from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).organization; + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; } /** - * Parse the location from FrameworkDeployment resource. + * Parse the location from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).location; + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; } /** - * Parse the framework_deployment from FrameworkDeployment resource. + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. - * @returns {string} A string representing the framework_deployment. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. */ - matchFrameworkDeploymentFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).framework_deployment; + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; } /** - * Return a fully-qualified organization resource name string. + * Return a fully-qualified organizationLocationCloudControls resource name string. * * @param {string} organization + * @param {string} location + * @param {string} cloud_control * @returns {string} Resource name string. */ - organizationPath(organization:string) { - return this.pathTemplates.organizationPathTemplate.render({ + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ organization: organization, + location: location, + cloud_control: cloudControl, }); } /** - * Parse the organization from Organization resource. + * Parse the organization from OrganizationLocationCloudControls resource. * - * @param {string} organizationName - * A fully-qualified path representing Organization resource. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromOrganizationName(organizationName: string) { - return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; - } - - /** - * Return a fully-qualified organizationLocation resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationPathTemplate.render({ - organization: organization, - location: location, - }); + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; } /** - * Parse the organization from OrganizationLocation resource. + * Parse the location from OrganizationLocationCloudControls resource. * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the organization. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the location. */ - matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; } /** - * Parse the location from OrganizationLocation resource. + * Parse the cloud_control from OrganizationLocationCloudControls resource. * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the location. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. */ - matchLocationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; } /** @@ -2163,6 +2106,55 @@ export class DeploymentClient { return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + /** * Return a fully-qualified organizationLocationFindingSummaries resource name string. * @@ -2470,6 +2462,202 @@ export class DeploymentClient { return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + /** * Return a fully-qualified projectLocationCmEnrollment resource name string. * @@ -2506,6 +2694,55 @@ export class DeploymentClient { return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + /** * Return a fully-qualified projectLocationFindingSummaries resource name string. * @@ -2813,6 +3050,104 @@ export class DeploymentClient { return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts b/packages/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts index 6286e4c2caa..71b4dc65ffa 100644 --- a/packages/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts +++ b/packages/google-cloud-cloudsecuritycompliance/src/v1/monitoring_client.ts @@ -183,12 +183,6 @@ export class MonitoringClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { - cloudControlPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' - ), - cloudControlDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' - ), folderLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -201,18 +195,21 @@ export class MonitoringClient { folderLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), - frameworkPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworks/{framework}' - ), - frameworkDeploymentPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' - ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + organizationLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + organizationLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/cloudControls/{cloud_control}' + ), organizationLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/cmEnrollment' ), + organizationLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/controls/{control}' + ), organizationLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -231,12 +228,27 @@ export class MonitoringClient { organizationLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + organizationLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + organizationLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/frameworks/{framework}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationCloudControlDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}' + ), + projectLocationCloudControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cloudControls/{cloud_control}' + ), projectLocationCmEnrollmentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/cmEnrollment' ), + projectLocationControlsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/controls/{control}' + ), projectLocationFindingSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/findingSummaries/{finding_summary}' ), @@ -255,6 +267,12 @@ export class MonitoringClient { projectLocationFrameworkComplianceSummariesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}' ), + projectLocationFrameworkDeploymentsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}' + ), + projectLocationFrameworksPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/frameworks/{framework}' + ), }; // Some of the methods on this service return "paged" results, @@ -424,6 +442,8 @@ export class MonitoringClient { * Required. The name of the framework compliance report to retrieve. * @param {google.protobuf.Timestamp} [request.endTime] * Optional. The end time of the report. + * @param {string} [request.filter] + * Optional. The filtering results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -630,6 +650,8 @@ export class MonitoringClient { * should return. * @param {string} [request.filter] * Optional. The filtering results. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] + * Optional. Specifies the level of detail to return in the response. * @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. @@ -732,6 +754,8 @@ export class MonitoringClient { * should return. * @param {string} [request.filter] * Optional. The filtering results. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] + * Optional. Specifies the level of detail to return in the response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -783,6 +807,8 @@ export class MonitoringClient { * should return. * @param {string} [request.filter] * Optional. The filtering results. + * @param {google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView} [request.view] + * Optional. Specifies the level of detail to return in the response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1318,104 +1344,6 @@ export class MonitoringClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified cloudControl resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control - * @returns {string} Resource name string. - */ - cloudControlPath(organization:string,location:string,cloudControl:string) { - return this.pathTemplates.cloudControlPathTemplate.render({ - organization: organization, - location: location, - cloud_control: cloudControl, - }); - } - - /** - * Parse the organization from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).organization; - } - - /** - * Parse the location from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).location; - } - - /** - * Parse the cloud_control from CloudControl resource. - * - * @param {string} cloudControlName - * A fully-qualified path representing CloudControl resource. - * @returns {string} A string representing the cloud_control. - */ - matchCloudControlFromCloudControlName(cloudControlName: string) { - return this.pathTemplates.cloudControlPathTemplate.match(cloudControlName).cloud_control; - } - - /** - * Return a fully-qualified cloudControlDeployment resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} cloud_control_deployment - * @returns {string} Resource name string. - */ - cloudControlDeploymentPath(organization:string,location:string,cloudControlDeployment:string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.render({ - organization: organization, - location: location, - cloud_control_deployment: cloudControlDeployment, - }); - } - - /** - * Parse the organization from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).organization; - } - - /** - * Parse the location from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).location; - } - - /** - * Parse the cloud_control_deployment from CloudControlDeployment resource. - * - * @param {string} cloudControlDeploymentName - * A fully-qualified path representing CloudControlDeployment resource. - * @returns {string} A string representing the cloud_control_deployment. - */ - matchCloudControlDeploymentFromCloudControlDeploymentName(cloudControlDeploymentName: string) { - return this.pathTemplates.cloudControlDeploymentPathTemplate.match(cloudControlDeploymentName).cloud_control_deployment; - } - /** * Return a fully-qualified folderLocationFindingSummaries resource name string. * @@ -1626,137 +1554,137 @@ export class MonitoringClient { } /** - * Return a fully-qualified framework resource name string. + * Return a fully-qualified location resource name string. * - * @param {string} organization + * @param {string} project * @param {string} location - * @param {string} framework * @returns {string} Resource name string. */ - frameworkPath(organization:string,location:string,framework:string) { - return this.pathTemplates.frameworkPathTemplate.render({ - organization: organization, + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, location: location, - framework: framework, }); } /** - * Parse the organization from Framework resource. + * Parse the project from Location resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the organization. + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. */ - matchOrganizationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).organization; + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; } /** - * Parse the location from Framework resource. + * Parse the location from Location resource. * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. + * @param {string} locationName + * A fully-qualified path representing Location resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).location; - } - - /** - * Parse the framework from Framework resource. - * - * @param {string} frameworkName - * A fully-qualified path representing Framework resource. - * @returns {string} A string representing the framework. - */ - matchFrameworkFromFrameworkName(frameworkName: string) { - return this.pathTemplates.frameworkPathTemplate.match(frameworkName).framework; + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; } /** - * Return a fully-qualified frameworkDeployment resource name string. + * Return a fully-qualified organizationLocationCloudControlDeployments resource name string. * * @param {string} organization * @param {string} location - * @param {string} framework_deployment + * @param {string} cloud_control_deployment * @returns {string} Resource name string. */ - frameworkDeploymentPath(organization:string,location:string,frameworkDeployment:string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.render({ + organizationLocationCloudControlDeploymentsPath(organization:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render({ organization: organization, location: location, - framework_deployment: frameworkDeployment, + cloud_control_deployment: cloudControlDeployment, }); } /** - * Parse the organization from FrameworkDeployment resource. + * Parse the organization from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).organization; + matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).organization; } /** - * Parse the location from FrameworkDeployment resource. + * Parse the location from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. * @returns {string} A string representing the location. */ - matchLocationFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).location; + matchLocationFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).location; } /** - * Parse the framework_deployment from FrameworkDeployment resource. + * Parse the cloud_control_deployment from OrganizationLocationCloudControlDeployments resource. * - * @param {string} frameworkDeploymentName - * A fully-qualified path representing FrameworkDeployment resource. - * @returns {string} A string representing the framework_deployment. + * @param {string} organizationLocationCloudControlDeploymentsName + * A fully-qualified path representing organization_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. */ - matchFrameworkDeploymentFromFrameworkDeploymentName(frameworkDeploymentName: string) { - return this.pathTemplates.frameworkDeploymentPathTemplate.match(frameworkDeploymentName).framework_deployment; + matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(organizationLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match(organizationLocationCloudControlDeploymentsName).cloud_control_deployment; } /** - * Return a fully-qualified location resource name string. + * Return a fully-qualified organizationLocationCloudControls resource name string. * - * @param {string} project + * @param {string} organization * @param {string} location + * @param {string} cloud_control * @returns {string} Resource name string. */ - locationPath(project:string,location:string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, + organizationLocationCloudControlsPath(organization:string,location:string,cloudControl:string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.render({ + organization: organization, location: location, + cloud_control: cloudControl, }); } /** - * Parse the project from Location resource. + * Parse the organization from OrganizationLocationCloudControls resource. * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the organization. */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; + matchOrganizationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).organization; } /** - * Parse the location from Location resource. + * Parse the location from OrganizationLocationCloudControls resource. * - * @param {string} locationName - * A fully-qualified path representing Location resource. + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. * @returns {string} A string representing the location. */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; + matchLocationFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from OrganizationLocationCloudControls resource. + * + * @param {string} organizationLocationCloudControlsName + * A fully-qualified path representing organization_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromOrganizationLocationCloudControlsName(organizationLocationCloudControlsName: string) { + return this.pathTemplates.organizationLocationCloudControlsPathTemplate.match(organizationLocationCloudControlsName).cloud_control; } /** @@ -1795,6 +1723,55 @@ export class MonitoringClient { return this.pathTemplates.organizationLocationCmEnrollmentPathTemplate.match(organizationLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified organizationLocationControls resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + organizationLocationControlsPath(organization:string,location:string,control:string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.render({ + organization: organization, + location: location, + control: control, + }); + } + + /** + * Parse the organization from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).organization; + } + + /** + * Parse the location from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).location; + } + + /** + * Parse the control from OrganizationLocationControls resource. + * + * @param {string} organizationLocationControlsName + * A fully-qualified path representing organization_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromOrganizationLocationControlsName(organizationLocationControlsName: string) { + return this.pathTemplates.organizationLocationControlsPathTemplate.match(organizationLocationControlsName).control; + } + /** * Return a fully-qualified organizationLocationFindingSummaries resource name string. * @@ -2102,6 +2079,104 @@ export class MonitoringClient { return this.pathTemplates.organizationLocationFrameworkComplianceSummariesPathTemplate.match(organizationLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified organizationLocationFrameworkDeployments resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + organizationLocationFrameworkDeploymentsPath(organization:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render({ + organization: organization, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from OrganizationLocationFrameworkDeployments resource. + * + * @param {string} organizationLocationFrameworkDeploymentsName + * A fully-qualified path representing organization_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(organizationLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match(organizationLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified organizationLocationFrameworks resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + organizationLocationFrameworksPath(organization:string,location:string,framework:string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.render({ + organization: organization, + location: location, + framework: framework, + }); + } + + /** + * Parse the organization from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).organization; + } + + /** + * Parse the location from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).location; + } + + /** + * Parse the framework from OrganizationLocationFrameworks resource. + * + * @param {string} organizationLocationFrameworksName + * A fully-qualified path representing organization_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromOrganizationLocationFrameworksName(organizationLocationFrameworksName: string) { + return this.pathTemplates.organizationLocationFrameworksPathTemplate.match(organizationLocationFrameworksName).framework; + } + /** * Return a fully-qualified project resource name string. * @@ -2125,6 +2200,104 @@ export class MonitoringClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationCloudControlDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control_deployment + * @returns {string} Resource name string. + */ + projectLocationCloudControlDeploymentsPath(project:string,location:string,cloudControlDeployment:string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render({ + project: project, + location: location, + cloud_control_deployment: cloudControlDeployment, + }); + } + + /** + * Parse the project from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).location; + } + + /** + * Parse the cloud_control_deployment from ProjectLocationCloudControlDeployments resource. + * + * @param {string} projectLocationCloudControlDeploymentsName + * A fully-qualified path representing project_location_cloudControlDeployments resource. + * @returns {string} A string representing the cloud_control_deployment. + */ + matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(projectLocationCloudControlDeploymentsName: string) { + return this.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match(projectLocationCloudControlDeploymentsName).cloud_control_deployment; + } + + /** + * Return a fully-qualified projectLocationCloudControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cloud_control + * @returns {string} Resource name string. + */ + projectLocationCloudControlsPath(project:string,location:string,cloudControl:string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.render({ + project: project, + location: location, + cloud_control: cloudControl, + }); + } + + /** + * Parse the project from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).project; + } + + /** + * Parse the location from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).location; + } + + /** + * Parse the cloud_control from ProjectLocationCloudControls resource. + * + * @param {string} projectLocationCloudControlsName + * A fully-qualified path representing project_location_cloudControls resource. + * @returns {string} A string representing the cloud_control. + */ + matchCloudControlFromProjectLocationCloudControlsName(projectLocationCloudControlsName: string) { + return this.pathTemplates.projectLocationCloudControlsPathTemplate.match(projectLocationCloudControlsName).cloud_control; + } + /** * Return a fully-qualified projectLocationCmEnrollment resource name string. * @@ -2161,6 +2334,55 @@ export class MonitoringClient { return this.pathTemplates.projectLocationCmEnrollmentPathTemplate.match(projectLocationCmEnrollmentName).location; } + /** + * Return a fully-qualified projectLocationControls resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} control + * @returns {string} Resource name string. + */ + projectLocationControlsPath(project:string,location:string,control:string) { + return this.pathTemplates.projectLocationControlsPathTemplate.render({ + project: project, + location: location, + control: control, + }); + } + + /** + * Parse the project from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).project; + } + + /** + * Parse the location from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).location; + } + + /** + * Parse the control from ProjectLocationControls resource. + * + * @param {string} projectLocationControlsName + * A fully-qualified path representing project_location_controls resource. + * @returns {string} A string representing the control. + */ + matchControlFromProjectLocationControlsName(projectLocationControlsName: string) { + return this.pathTemplates.projectLocationControlsPathTemplate.match(projectLocationControlsName).control; + } + /** * Return a fully-qualified projectLocationFindingSummaries resource name string. * @@ -2468,6 +2690,104 @@ export class MonitoringClient { return this.pathTemplates.projectLocationFrameworkComplianceSummariesPathTemplate.match(projectLocationFrameworkComplianceSummariesName).framework_compliance_summary; } + /** + * Return a fully-qualified projectLocationFrameworkDeployments resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework_deployment + * @returns {string} Resource name string. + */ + projectLocationFrameworkDeploymentsPath(project:string,location:string,frameworkDeployment:string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render({ + project: project, + location: location, + framework_deployment: frameworkDeployment, + }); + } + + /** + * Parse the project from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).project; + } + + /** + * Parse the location from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).location; + } + + /** + * Parse the framework_deployment from ProjectLocationFrameworkDeployments resource. + * + * @param {string} projectLocationFrameworkDeploymentsName + * A fully-qualified path representing project_location_frameworkDeployments resource. + * @returns {string} A string representing the framework_deployment. + */ + matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(projectLocationFrameworkDeploymentsName: string) { + return this.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match(projectLocationFrameworkDeploymentsName).framework_deployment; + } + + /** + * Return a fully-qualified projectLocationFrameworks resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} framework + * @returns {string} Resource name string. + */ + projectLocationFrameworksPath(project:string,location:string,framework:string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.render({ + project: project, + location: location, + framework: framework, + }); + } + + /** + * Parse the project from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).project; + } + + /** + * Parse the location from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).location; + } + + /** + * Parse the framework from ProjectLocationFrameworks resource. + * + * @param {string} projectLocationFrameworksName + * A fully-qualified path representing project_location_frameworks resource. + * @returns {string} A string representing the framework. + */ + matchFrameworkFromProjectLocationFrameworksName(projectLocationFrameworksName: string) { + return this.pathTemplates.projectLocationFrameworksPathTemplate.match(projectLocationFrameworksName).framework; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-cloudsecuritycompliance/system-test/install.ts b/packages/google-cloud-cloudsecuritycompliance/system-test/install.ts index 394f3362d20..f66069aa394 100644 --- a/packages/google-cloud-cloudsecuritycompliance/system-test/install.ts +++ b/packages/google-cloud-cloudsecuritycompliance/system-test/install.ts @@ -40,7 +40,7 @@ describe('📦 pack-n-play test', () => { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() } }; await packNTest(options); diff --git a/packages/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts b/packages/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts index 15437030df8..731fc0c5c8c 100644 --- a/packages/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts +++ b/packages/google-cloud-cloudsecuritycompliance/test/gapic_audit_v1.ts @@ -1313,98 +1313,6 @@ describe('v1.AuditClient', () => { describe('Path templates', () => { - describe('cloudControl', async () => { - const fakePath = "/rendered/path/cloudControl"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlPath', () => { - const result = client.cloudControlPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlName', () => { - const result = client.matchOrganizationFromCloudControlName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlName', () => { - const result = client.matchLocationFromCloudControlName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromCloudControlName', () => { - const result = client.matchCloudControlFromCloudControlName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('cloudControlDeployment', async () => { - const fakePath = "/rendered/path/cloudControlDeployment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new auditModule.v1.AuditClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlDeploymentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlDeploymentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlDeploymentPath', () => { - const result = client.cloudControlDeploymentPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlDeploymentName', () => { - const result = client.matchOrganizationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlDeploymentName', () => { - const result = client.matchLocationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromCloudControlDeploymentName', () => { - const result = client.matchCloudControlDeploymentFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - describe('folderLocationFindingSummaries', async () => { const fakePath = "/rendered/path/folderLocationFindingSummaries"; const expectedParameters = { @@ -1597,132 +1505,132 @@ describe('v1.AuditClient', () => { }); }); - describe('framework', async () => { - const fakePath = "/rendered/path/framework"; + describe('location', async () => { + const fakePath = "/rendered/path/location"; const expectedParameters = { - organization: "organizationValue", + project: "projectValue", location: "locationValue", - framework: "frameworkValue", }; const client = new auditModule.v1.AuditClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkPathTemplate.render = + client.pathTemplates.locationPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkPathTemplate.match = + client.pathTemplates.locationPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkPath', () => { - const result = client.frameworkPath("organizationValue", "locationValue", "frameworkValue"); + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkPathTemplate.render as SinonStub) + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkName', () => { - const result = client.matchOrganizationFromFrameworkName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkName', () => { - const result = client.matchLocationFromFrameworkName(fakePath); + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromFrameworkName', () => { - const result = client.matchFrameworkFromFrameworkName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('frameworkDeployment', async () => { - const fakePath = "/rendered/path/frameworkDeployment"; + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; const expectedParameters = { organization: "organizationValue", location: "locationValue", - framework_deployment: "frameworkDeploymentValue", + cloud_control_deployment: "cloudControlDeploymentValue", }; const client = new auditModule.v1.AuditClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkDeploymentPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkDeploymentPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkDeploymentPath', () => { - const result = client.frameworkDeploymentPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkDeploymentName', () => { - const result = client.matchOrganizationFromFrameworkDeploymentName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkDeploymentName', () => { - const result = client.matchLocationFromFrameworkDeploymentName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchFrameworkDeploymentFromFrameworkDeploymentName', () => { - const result = client.matchFrameworkDeploymentFromFrameworkDeploymentName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('location', async () => { - const fakePath = "/rendered/path/location"; + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; const expectedParameters = { - project: "projectValue", + organization: "organizationValue", location: "locationValue", + cloud_control: "cloudControlValue", }; const client = new auditModule.v1.AuditClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.locationPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.locationPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('locationPath', () => { - const result = client.locationPath("projectValue", "locationValue"); + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.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) + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); @@ -1765,6 +1673,52 @@ describe('v1.AuditClient', () => { }); }); + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('organizationLocationFindingSummaries', async () => { const fakePath = "/rendered/path/organizationLocationFindingSummaries"; const expectedParameters = { @@ -2049,6 +2003,98 @@ describe('v1.AuditClient', () => { }); }); + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2079,6 +2125,98 @@ describe('v1.AuditClient', () => { }); }); + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationCmEnrollment', async () => { const fakePath = "/rendered/path/projectLocationCmEnrollment"; const expectedParameters = { @@ -2117,6 +2255,52 @@ describe('v1.AuditClient', () => { }); }); + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationFindingSummaries', async () => { const fakePath = "/rendered/path/projectLocationFindingSummaries"; const expectedParameters = { @@ -2400,5 +2584,97 @@ describe('v1.AuditClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new auditModule.v1.AuditClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts b/packages/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts index 14d9a1c2657..7a0c86fb914 100644 --- a/packages/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts +++ b/packages/google-cloud-cloudsecuritycompliance/test/gapic_cm_enrollment_service_v1.ts @@ -620,98 +620,6 @@ describe('v1.CmEnrollmentServiceClient', () => { describe('Path templates', () => { - describe('cloudControl', async () => { - const fakePath = "/rendered/path/cloudControl"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlPath', () => { - const result = client.cloudControlPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlName', () => { - const result = client.matchOrganizationFromCloudControlName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlName', () => { - const result = client.matchLocationFromCloudControlName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromCloudControlName', () => { - const result = client.matchCloudControlFromCloudControlName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('cloudControlDeployment', async () => { - const fakePath = "/rendered/path/cloudControlDeployment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlDeploymentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlDeploymentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlDeploymentPath', () => { - const result = client.cloudControlDeploymentPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlDeploymentName', () => { - const result = client.matchOrganizationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlDeploymentName', () => { - const result = client.matchLocationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromCloudControlDeploymentName', () => { - const result = client.matchCloudControlDeploymentFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - describe('folderLocationFindingSummaries', async () => { const fakePath = "/rendered/path/folderLocationFindingSummaries"; const expectedParameters = { @@ -904,94 +812,94 @@ describe('v1.CmEnrollmentServiceClient', () => { }); }); - describe('framework', async () => { - const fakePath = "/rendered/path/framework"; + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; const expectedParameters = { organization: "organizationValue", location: "locationValue", - framework: "frameworkValue", + cloud_control_deployment: "cloudControlDeploymentValue", }; const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkPath', () => { - const result = client.frameworkPath("organizationValue", "locationValue", "frameworkValue"); + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkName', () => { - const result = client.matchOrganizationFromFrameworkName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkName', () => { - const result = client.matchLocationFromFrameworkName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchFrameworkFromFrameworkName', () => { - const result = client.matchFrameworkFromFrameworkName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('frameworkDeployment', async () => { - const fakePath = "/rendered/path/frameworkDeployment"; + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; const expectedParameters = { organization: "organizationValue", location: "locationValue", - framework_deployment: "frameworkDeploymentValue", + cloud_control: "cloudControlValue", }; const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkDeploymentPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkDeploymentPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkDeploymentPath', () => { - const result = client.frameworkDeploymentPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkDeploymentName', () => { - const result = client.matchOrganizationFromFrameworkDeploymentName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkDeploymentName', () => { - const result = client.matchLocationFromFrameworkDeploymentName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchFrameworkDeploymentFromFrameworkDeploymentName', () => { - const result = client.matchFrameworkDeploymentFromFrameworkDeploymentName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); @@ -1034,6 +942,52 @@ describe('v1.CmEnrollmentServiceClient', () => { }); }); + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('organizationLocationFindingSummaries', async () => { const fakePath = "/rendered/path/organizationLocationFindingSummaries"; const expectedParameters = { @@ -1318,6 +1272,190 @@ describe('v1.CmEnrollmentServiceClient', () => { }); }); + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationCmEnrollment', async () => { const fakePath = "/rendered/path/projectLocationCmEnrollment"; const expectedParameters = { @@ -1356,6 +1494,52 @@ describe('v1.CmEnrollmentServiceClient', () => { }); }); + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationFindingSummaries', async () => { const fakePath = "/rendered/path/projectLocationFindingSummaries"; const expectedParameters = { @@ -1639,5 +1823,97 @@ describe('v1.CmEnrollmentServiceClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new cmenrollmentserviceModule.v1.CmEnrollmentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts b/packages/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts index a789d6e10e6..cdad6d13971 100644 --- a/packages/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts +++ b/packages/google-cloud-cloudsecuritycompliance/test/gapic_config_v1.ts @@ -1789,98 +1789,6 @@ describe('v1.ConfigClient', () => { describe('Path templates', () => { - describe('cloudControl', async () => { - const fakePath = "/rendered/path/cloudControl"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlPath', () => { - const result = client.cloudControlPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlName', () => { - const result = client.matchOrganizationFromCloudControlName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlName', () => { - const result = client.matchLocationFromCloudControlName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromCloudControlName', () => { - const result = client.matchCloudControlFromCloudControlName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('cloudControlDeployment', async () => { - const fakePath = "/rendered/path/cloudControlDeployment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlDeploymentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlDeploymentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlDeploymentPath', () => { - const result = client.cloudControlDeploymentPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlDeploymentName', () => { - const result = client.matchOrganizationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlDeploymentName', () => { - const result = client.matchLocationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromCloudControlDeploymentName', () => { - const result = client.matchCloudControlDeploymentFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - describe('folderLocationFindingSummaries', async () => { const fakePath = "/rendered/path/folderLocationFindingSummaries"; const expectedParameters = { @@ -2073,162 +1981,162 @@ describe('v1.ConfigClient', () => { }); }); - describe('framework', async () => { - const fakePath = "/rendered/path/framework"; + describe('organization', async () => { + const fakePath = "/rendered/path/organization"; const expectedParameters = { organization: "organizationValue", - location: "locationValue", - framework: "frameworkValue", }; const client = new configModule.v1.ConfigClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkPathTemplate.render = + client.pathTemplates.organizationPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkPathTemplate.match = + client.pathTemplates.organizationPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkPath', () => { - const result = client.frameworkPath("organizationValue", "locationValue", "frameworkValue"); + it('organizationPath', () => { + const result = client.organizationPath("organizationValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkName', () => { - const result = client.matchOrganizationFromFrameworkName(fakePath); + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFrameworkName', () => { - const result = client.matchLocationFromFrameworkName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromFrameworkName', () => { - const result = client.matchFrameworkFromFrameworkName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('frameworkDeployment', async () => { - const fakePath = "/rendered/path/frameworkDeployment"; + describe('organizationLocation', async () => { + const fakePath = "/rendered/path/organizationLocation"; const expectedParameters = { organization: "organizationValue", location: "locationValue", - framework_deployment: "frameworkDeploymentValue", }; const client = new configModule.v1.ConfigClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkDeploymentPathTemplate.render = + client.pathTemplates.organizationLocationPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkDeploymentPathTemplate.match = + client.pathTemplates.organizationLocationPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkDeploymentPath', () => { - const result = client.frameworkDeploymentPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + it('organizationLocationPath', () => { + const result = client.organizationLocationPath("organizationValue", "locationValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkDeploymentName', () => { - const result = client.matchOrganizationFromFrameworkDeploymentName(fakePath); + it('matchOrganizationFromOrganizationLocationName', () => { + const result = client.matchOrganizationFromOrganizationLocationName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkDeploymentName', () => { - const result = client.matchLocationFromFrameworkDeploymentName(fakePath); + it('matchLocationFromOrganizationLocationName', () => { + const result = client.matchLocationFromOrganizationLocationName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromFrameworkDeploymentName', () => { - const result = client.matchFrameworkDeploymentFromFrameworkDeploymentName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('organization', async () => { - const fakePath = "/rendered/path/organization"; + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; const expectedParameters = { organization: "organizationValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", }; const client = new configModule.v1.ConfigClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.organizationPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.organizationPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('organizationPath', () => { - const result = client.organizationPath("organizationValue"); + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromOrganizationName', () => { - const result = client.matchOrganizationFromOrganizationName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('organizationLocation', async () => { - const fakePath = "/rendered/path/organizationLocation"; + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; const expectedParameters = { organization: "organizationValue", location: "locationValue", + cloud_control: "cloudControlValue", }; const client = new configModule.v1.ConfigClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.organizationLocationPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('organizationLocationPath', () => { - const result = client.organizationLocationPath("organizationValue", "locationValue"); + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromOrganizationLocationName', () => { - const result = client.matchOrganizationFromOrganizationLocationName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromOrganizationLocationName', () => { - const result = client.matchLocationFromOrganizationLocationName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); @@ -2271,6 +2179,52 @@ describe('v1.ConfigClient', () => { }); }); + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('organizationLocationFindingSummaries', async () => { const fakePath = "/rendered/path/organizationLocationFindingSummaries"; const expectedParameters = { @@ -2555,6 +2509,190 @@ describe('v1.ConfigClient', () => { }); }); + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationCmEnrollment', async () => { const fakePath = "/rendered/path/projectLocationCmEnrollment"; const expectedParameters = { @@ -2593,6 +2731,52 @@ describe('v1.ConfigClient', () => { }); }); + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationFindingSummaries', async () => { const fakePath = "/rendered/path/projectLocationFindingSummaries"; const expectedParameters = { @@ -2876,5 +3060,97 @@ describe('v1.ConfigClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts b/packages/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts index 30fab6d7700..d3887b2ab37 100644 --- a/packages/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts +++ b/packages/google-cloud-cloudsecuritycompliance/test/gapic_deployment_v1.ts @@ -1712,98 +1712,6 @@ describe('v1.DeploymentClient', () => { describe('Path templates', () => { - describe('cloudControl', async () => { - const fakePath = "/rendered/path/cloudControl"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlPath', () => { - const result = client.cloudControlPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlName', () => { - const result = client.matchOrganizationFromCloudControlName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlName', () => { - const result = client.matchLocationFromCloudControlName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromCloudControlName', () => { - const result = client.matchCloudControlFromCloudControlName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('cloudControlDeployment', async () => { - const fakePath = "/rendered/path/cloudControlDeployment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new deploymentModule.v1.DeploymentClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlDeploymentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlDeploymentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlDeploymentPath', () => { - const result = client.cloudControlDeploymentPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlDeploymentName', () => { - const result = client.matchOrganizationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlDeploymentName', () => { - const result = client.matchLocationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromCloudControlDeploymentName', () => { - const result = client.matchCloudControlDeploymentFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - describe('folderLocationFindingSummaries', async () => { const fakePath = "/rendered/path/folderLocationFindingSummaries"; const expectedParameters = { @@ -1996,162 +1904,162 @@ describe('v1.DeploymentClient', () => { }); }); - describe('framework', async () => { - const fakePath = "/rendered/path/framework"; + describe('organization', async () => { + const fakePath = "/rendered/path/organization"; const expectedParameters = { organization: "organizationValue", - location: "locationValue", - framework: "frameworkValue", }; const client = new deploymentModule.v1.DeploymentClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkPathTemplate.render = + client.pathTemplates.organizationPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkPathTemplate.match = + client.pathTemplates.organizationPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkPath', () => { - const result = client.frameworkPath("organizationValue", "locationValue", "frameworkValue"); + it('organizationPath', () => { + const result = client.organizationPath("organizationValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkName', () => { - const result = client.matchOrganizationFromFrameworkName(fakePath); + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFrameworkName', () => { - const result = client.matchLocationFromFrameworkName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromFrameworkName', () => { - const result = client.matchFrameworkFromFrameworkName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('frameworkDeployment', async () => { - const fakePath = "/rendered/path/frameworkDeployment"; + describe('organizationLocation', async () => { + const fakePath = "/rendered/path/organizationLocation"; const expectedParameters = { organization: "organizationValue", location: "locationValue", - framework_deployment: "frameworkDeploymentValue", }; const client = new deploymentModule.v1.DeploymentClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkDeploymentPathTemplate.render = + client.pathTemplates.organizationLocationPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkDeploymentPathTemplate.match = + client.pathTemplates.organizationLocationPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkDeploymentPath', () => { - const result = client.frameworkDeploymentPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + it('organizationLocationPath', () => { + const result = client.organizationLocationPath("organizationValue", "locationValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkDeploymentName', () => { - const result = client.matchOrganizationFromFrameworkDeploymentName(fakePath); + it('matchOrganizationFromOrganizationLocationName', () => { + const result = client.matchOrganizationFromOrganizationLocationName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkDeploymentName', () => { - const result = client.matchLocationFromFrameworkDeploymentName(fakePath); + it('matchLocationFromOrganizationLocationName', () => { + const result = client.matchLocationFromOrganizationLocationName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkDeploymentFromFrameworkDeploymentName', () => { - const result = client.matchFrameworkDeploymentFromFrameworkDeploymentName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('organization', async () => { - const fakePath = "/rendered/path/organization"; + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; const expectedParameters = { organization: "organizationValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", }; const client = new deploymentModule.v1.DeploymentClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.organizationPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.organizationPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('organizationPath', () => { - const result = client.organizationPath("organizationValue"); + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromOrganizationName', () => { - const result = client.matchOrganizationFromOrganizationName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('organizationLocation', async () => { - const fakePath = "/rendered/path/organizationLocation"; + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; const expectedParameters = { organization: "organizationValue", location: "locationValue", + cloud_control: "cloudControlValue", }; const client = new deploymentModule.v1.DeploymentClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.organizationLocationPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('organizationLocationPath', () => { - const result = client.organizationLocationPath("organizationValue", "locationValue"); + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromOrganizationLocationName', () => { - const result = client.matchOrganizationFromOrganizationLocationName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromOrganizationLocationName', () => { - const result = client.matchLocationFromOrganizationLocationName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); @@ -2194,6 +2102,52 @@ describe('v1.DeploymentClient', () => { }); }); + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('organizationLocationFindingSummaries', async () => { const fakePath = "/rendered/path/organizationLocationFindingSummaries"; const expectedParameters = { @@ -2478,6 +2432,190 @@ describe('v1.DeploymentClient', () => { }); }); + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationCmEnrollment', async () => { const fakePath = "/rendered/path/projectLocationCmEnrollment"; const expectedParameters = { @@ -2516,6 +2654,52 @@ describe('v1.DeploymentClient', () => { }); }); + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationFindingSummaries', async () => { const fakePath = "/rendered/path/projectLocationFindingSummaries"; const expectedParameters = { @@ -2799,5 +2983,97 @@ describe('v1.DeploymentClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new deploymentModule.v1.DeploymentClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); }); diff --git a/packages/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts b/packages/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts index 6b2b6658f86..3e72919f304 100644 --- a/packages/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts +++ b/packages/google-cloud-cloudsecuritycompliance/test/gapic_monitoring_v1.ts @@ -1378,98 +1378,6 @@ describe('v1.MonitoringClient', () => { describe('Path templates', () => { - describe('cloudControl', async () => { - const fakePath = "/rendered/path/cloudControl"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control: "cloudControlValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlPath', () => { - const result = client.cloudControlPath("organizationValue", "locationValue", "cloudControlValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlName', () => { - const result = client.matchOrganizationFromCloudControlName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlName', () => { - const result = client.matchLocationFromCloudControlName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlFromCloudControlName', () => { - const result = client.matchCloudControlFromCloudControlName(fakePath); - assert.strictEqual(result, "cloudControlValue"); - assert((client.pathTemplates.cloudControlPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('cloudControlDeployment', async () => { - const fakePath = "/rendered/path/cloudControlDeployment"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - cloud_control_deployment: "cloudControlDeploymentValue", - }; - const client = new monitoringModule.v1.MonitoringClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.cloudControlDeploymentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.cloudControlDeploymentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('cloudControlDeploymentPath', () => { - const result = client.cloudControlDeploymentPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromCloudControlDeploymentName', () => { - const result = client.matchOrganizationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromCloudControlDeploymentName', () => { - const result = client.matchLocationFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchCloudControlDeploymentFromCloudControlDeploymentName', () => { - const result = client.matchCloudControlDeploymentFromCloudControlDeploymentName(fakePath); - assert.strictEqual(result, "cloudControlDeploymentValue"); - assert((client.pathTemplates.cloudControlDeploymentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - describe('folderLocationFindingSummaries', async () => { const fakePath = "/rendered/path/folderLocationFindingSummaries"; const expectedParameters = { @@ -1662,132 +1570,132 @@ describe('v1.MonitoringClient', () => { }); }); - describe('framework', async () => { - const fakePath = "/rendered/path/framework"; + describe('location', async () => { + const fakePath = "/rendered/path/location"; const expectedParameters = { - organization: "organizationValue", + project: "projectValue", location: "locationValue", - framework: "frameworkValue", }; const client = new monitoringModule.v1.MonitoringClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkPathTemplate.render = + client.pathTemplates.locationPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkPathTemplate.match = + client.pathTemplates.locationPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkPath', () => { - const result = client.frameworkPath("organizationValue", "locationValue", "frameworkValue"); + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkPathTemplate.render as SinonStub) + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkName', () => { - const result = client.matchOrganizationFromFrameworkName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkName', () => { - const result = client.matchLocationFromFrameworkName(fakePath); + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFrameworkFromFrameworkName', () => { - const result = client.matchFrameworkFromFrameworkName(fakePath); - assert.strictEqual(result, "frameworkValue"); - assert((client.pathTemplates.frameworkPathTemplate.match as SinonStub) + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('frameworkDeployment', async () => { - const fakePath = "/rendered/path/frameworkDeployment"; + describe('organizationLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControlDeployments"; const expectedParameters = { organization: "organizationValue", location: "locationValue", - framework_deployment: "frameworkDeploymentValue", + cloud_control_deployment: "cloudControlDeploymentValue", }; const client = new monitoringModule.v1.MonitoringClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.frameworkDeploymentPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.frameworkDeploymentPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('frameworkDeploymentPath', () => { - const result = client.frameworkDeploymentPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + it('organizationLocationCloudControlDeploymentsPath', () => { + const result = client.organizationLocationCloudControlDeploymentsPath("organizationValue", "locationValue", "cloudControlDeploymentValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.render as SinonStub) .getCall(-1).calledWith(expectedParameters)); }); - it('matchOrganizationFromFrameworkDeploymentName', () => { - const result = client.matchOrganizationFromFrameworkDeploymentName(fakePath); + it('matchOrganizationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromFrameworkDeploymentName', () => { - const result = client.matchLocationFromFrameworkDeploymentName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlDeploymentsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchFrameworkDeploymentFromFrameworkDeploymentName', () => { - const result = client.matchFrameworkDeploymentFromFrameworkDeploymentName(fakePath); - assert.strictEqual(result, "frameworkDeploymentValue"); - assert((client.pathTemplates.frameworkDeploymentPathTemplate.match as SinonStub) + it('matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromOrganizationLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.organizationLocationCloudControlDeploymentsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); - describe('location', async () => { - const fakePath = "/rendered/path/location"; + describe('organizationLocationCloudControls', async () => { + const fakePath = "/rendered/path/organizationLocationCloudControls"; const expectedParameters = { - project: "projectValue", + organization: "organizationValue", location: "locationValue", + cloud_control: "cloudControlValue", }; const client = new monitoringModule.v1.MonitoringClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - client.pathTemplates.locationPathTemplate.render = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.locationPathTemplate.match = + client.pathTemplates.organizationLocationCloudControlsPathTemplate.match = sinon.stub().returns(expectedParameters); - it('locationPath', () => { - const result = client.locationPath("projectValue", "locationValue"); + it('organizationLocationCloudControlsPath', () => { + const result = client.organizationLocationCloudControlsPath("organizationValue", "locationValue", "cloudControlValue"); assert.strictEqual(result, fakePath); - assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.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) + it('matchOrganizationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); + it('matchLocationFromOrganizationLocationCloudControlsName', () => { + const result = client.matchLocationFromOrganizationLocationCloudControlsName(fakePath); assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromOrganizationLocationCloudControlsName', () => { + const result = client.matchCloudControlFromOrganizationLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.organizationLocationCloudControlsPathTemplate.match as SinonStub) .getCall(-1).calledWith(fakePath)); }); }); @@ -1830,6 +1738,52 @@ describe('v1.MonitoringClient', () => { }); }); + describe('organizationLocationControls', async () => { + const fakePath = "/rendered/path/organizationLocationControls"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + control: "controlValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationControlsPath', () => { + const result = client.organizationLocationControlsPath("organizationValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationControlsName', () => { + const result = client.matchOrganizationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationControlsName', () => { + const result = client.matchLocationFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromOrganizationLocationControlsName', () => { + const result = client.matchControlFromOrganizationLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.organizationLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('organizationLocationFindingSummaries', async () => { const fakePath = "/rendered/path/organizationLocationFindingSummaries"; const expectedParameters = { @@ -2114,6 +2068,98 @@ describe('v1.MonitoringClient', () => { }); }); + describe('organizationLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworkDeployments"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworkDeploymentsPath', () => { + const result = client.organizationLocationFrameworkDeploymentsPath("organizationValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromOrganizationLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.organizationLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFrameworks', async () => { + const fakePath = "/rendered/path/organizationLocationFrameworks"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFrameworksPath', () => { + const result = client.organizationLocationFrameworksPath("organizationValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFrameworksName', () => { + const result = client.matchOrganizationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFrameworksName', () => { + const result = client.matchLocationFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromOrganizationLocationFrameworksName', () => { + const result = client.matchFrameworkFromOrganizationLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.organizationLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2144,6 +2190,98 @@ describe('v1.MonitoringClient', () => { }); }); + describe('projectLocationCloudControlDeployments', async () => { + const fakePath = "/rendered/path/projectLocationCloudControlDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control_deployment: "cloudControlDeploymentValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlDeploymentsPath', () => { + const result = client.projectLocationCloudControlDeploymentsPath("projectValue", "locationValue", "cloudControlDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName', () => { + const result = client.matchCloudControlDeploymentFromProjectLocationCloudControlDeploymentsName(fakePath); + assert.strictEqual(result, "cloudControlDeploymentValue"); + assert((client.pathTemplates.projectLocationCloudControlDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationCloudControls', async () => { + const fakePath = "/rendered/path/projectLocationCloudControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cloud_control: "cloudControlValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationCloudControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCloudControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCloudControlsPath', () => { + const result = client.projectLocationCloudControlsPath("projectValue", "locationValue", "cloudControlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationCloudControlsName', () => { + const result = client.matchProjectFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationCloudControlsName', () => { + const result = client.matchLocationFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchCloudControlFromProjectLocationCloudControlsName', () => { + const result = client.matchCloudControlFromProjectLocationCloudControlsName(fakePath); + assert.strictEqual(result, "cloudControlValue"); + assert((client.pathTemplates.projectLocationCloudControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationCmEnrollment', async () => { const fakePath = "/rendered/path/projectLocationCmEnrollment"; const expectedParameters = { @@ -2182,6 +2320,52 @@ describe('v1.MonitoringClient', () => { }); }); + describe('projectLocationControls', async () => { + const fakePath = "/rendered/path/projectLocationControls"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + control: "controlValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationControlsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationControlsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationControlsPath', () => { + const result = client.projectLocationControlsPath("projectValue", "locationValue", "controlValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationControlsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationControlsName', () => { + const result = client.matchProjectFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationControlsName', () => { + const result = client.matchLocationFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchControlFromProjectLocationControlsName', () => { + const result = client.matchControlFromProjectLocationControlsName(fakePath); + assert.strictEqual(result, "controlValue"); + assert((client.pathTemplates.projectLocationControlsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('projectLocationFindingSummaries', async () => { const fakePath = "/rendered/path/projectLocationFindingSummaries"; const expectedParameters = { @@ -2465,5 +2649,97 @@ describe('v1.MonitoringClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('projectLocationFrameworkDeployments', async () => { + const fakePath = "/rendered/path/projectLocationFrameworkDeployments"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework_deployment: "frameworkDeploymentValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworkDeploymentsPath', () => { + const result = client.projectLocationFrameworkDeploymentsPath("projectValue", "locationValue", "frameworkDeploymentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchProjectFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchLocationFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName', () => { + const result = client.matchFrameworkDeploymentFromProjectLocationFrameworkDeploymentsName(fakePath); + assert.strictEqual(result, "frameworkDeploymentValue"); + assert((client.pathTemplates.projectLocationFrameworkDeploymentsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationFrameworks', async () => { + const fakePath = "/rendered/path/projectLocationFrameworks"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + framework: "frameworkValue", + }; + const client = new monitoringModule.v1.MonitoringClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFrameworksPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFrameworksPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFrameworksPath', () => { + const result = client.projectLocationFrameworksPath("projectValue", "locationValue", "frameworkValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFrameworksName', () => { + const result = client.matchProjectFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFrameworksName', () => { + const result = client.matchLocationFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFrameworkFromProjectLocationFrameworksName', () => { + const result = client.matchFrameworkFromProjectLocationFrameworksName(fakePath); + assert.strictEqual(result, "frameworkValue"); + assert((client.pathTemplates.projectLocationFrameworksPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); });